System.Linq.Expressions.Expression.Constant C# (CSharp) Method

Constant() public static method

Creates a ConstantExpression that has the ConstantExpression.Value property set to the specified value. .
public static Constant ( object value ) : ConstantExpression
value object An to set the property equal to.
return ConstantExpression
        public static ConstantExpression Constant(object value)
        {
            return new ConstantExpression(value);
        }

Same methods

Expression::Constant ( object value, Type type ) : ConstantExpression

Usage Example

示例#1
0
 static Expression GetArgument(Expression Expression, int n)
 {
     if (Expression.Type == typeof(LuaArguments))
         return Expression.Property(Expression, "Item", Expression.Constant(n));
     else
         return Expression.ArrayAccess(Expression, Expression.Constant(n));
 }
All Usage Examples Of System.Linq.Expressions.Expression::Constant
Expression