Expression Class

Expression Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Provides the base class from which the classes that represent expression tree nodes are derived. It also contains static (Shared in Visual Basic) factory methods to create the various node types. This is an abstract class.

System::Object
  System.Linq.Expressions::Expression
    More...

Namespace:  System.Linq.Expressions
Assembly:  System.Core (in System.Core.dll)

No code example is currently available or this language may not be supported.

The Expression type exposes the following members.

  NameDescription
Protected methodExpression()Constructs a new instance of Expression.
Protected methodExpression(ExpressionType, Type) Obsolete. Initializes a new instance of the Expression class.
Top

  NameDescription
Public propertyCanReduceIndicates that the node can be reduced to a simpler node. If this returns true, Reduce() can be called to produce the reduced form.
Public propertyNodeTypeGets the node type of this Expression.
Public propertyTypeGets the static type of the expression that this Expression represents.
Top

  NameDescription
Protected methodAcceptDispatches to the specific visit method for this node type. For example, MethodCallExpression calls the VisitMethodCall.
Public methodStatic memberAdd(Expression, Expression)Creates a BinaryExpression that represents an arithmetic addition operation that does not have overflow checking.
Public methodStatic memberAdd(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents an arithmetic addition operation that does not have overflow checking. The implementing method can be specified.
Public methodStatic memberAddAssign(Expression, Expression)Creates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.
Public methodStatic memberAddAssign(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.
Public methodStatic memberAddAssign(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.
Public methodStatic memberAddAssignChecked(Expression, Expression)Creates a BinaryExpression that represents an addition assignment operation that has overflow checking.
Public methodStatic memberAddAssignChecked(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents an addition assignment operation that has overflow checking.
Public methodStatic memberAddAssignChecked(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents an addition assignment operation that has overflow checking.
Public methodStatic memberAddChecked(Expression, Expression)Creates a BinaryExpression that represents an arithmetic addition operation that has overflow checking.
Public methodStatic memberAddChecked(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents an arithmetic addition operation that has overflow checking. The implementing method can be specified.
Public methodStatic memberAnd(Expression, Expression)Creates a BinaryExpression that represents a bitwise AND operation.
Public methodStatic memberAnd(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a bitwise AND operation. The implementing method can be specified.
Public methodStatic memberAndAlso(Expression, Expression)Creates a BinaryExpression that represents a conditional AND operation that evaluates the second operand only if the first operand evaluates to true.
Public methodStatic memberAndAlso(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a conditional AND operation that evaluates the second operand only if the first operand is resolved to true. The implementing method can be specified.
Public methodStatic memberAndAssign(Expression, Expression)Creates a BinaryExpression that represents a bitwise AND assignment operation.
Public methodStatic memberAndAssign(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a bitwise AND assignment operation.
Public methodStatic memberAndAssign(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents a bitwise AND assignment operation.
Public methodStatic memberArrayAccess(Expression, IEnumerable<Expression>)Creates an IndexExpression to access a multidimensional array.
Public methodStatic memberArrayAccess(Expression, array<Expression>)Creates an IndexExpression to access an array.
Public methodStatic memberArrayIndex(Expression, IEnumerable<Expression>)Creates a MethodCallExpression that represents applying an array index operator to an array of rank more than one.
Public methodStatic memberArrayIndex(Expression, Expression)Creates a BinaryExpression that represents applying an array index operator to an array of rank one.
Public methodStatic memberArrayIndex(Expression, array<Expression>)Creates a MethodCallExpression that represents applying an array index operator to a multidimensional array.
Public methodStatic memberArrayLengthCreates a UnaryExpression that represents an expression for obtaining the length of a one-dimensional array.
Public methodStatic memberAssignCreates a BinaryExpression that represents an assignment operation.
Public methodStatic memberBind(MemberInfo, Expression)Creates a MemberAssignment that represents the initialization of a field or property.
Public methodStatic memberBind(MethodInfo, Expression)Creates a MemberAssignment that represents the initialization of a member by using a property accessor method.
Public methodStatic memberBlock(array<Expression>)Creates a BlockExpression that contains the given expressions and has no variables.
Public methodStatic memberBlock(IEnumerable<Expression>)Creates a BlockExpression that contains the given expressions and has no variables.
Public methodStatic memberBlock(Expression, Expression)Creates a BlockExpression that contains two expressions and has no variables.
Public methodStatic memberBlock(IEnumerable<ParameterExpression>, IEnumerable<Expression>)Creates a BlockExpression that contains the given variables and expressions.
Public methodStatic memberBlock(IEnumerable<ParameterExpression>, array<Expression>)Creates a BlockExpression that contains the given variables and expressions.
Public methodStatic memberBlock(Type, IEnumerable<Expression>)Creates a BlockExpression that contains the given expressions, has no variables and has specific result type.
Public methodStatic memberBlock(Type, array<Expression>)Creates a BlockExpression that contains the given expressions, has no variables and has specific result type.
Public methodStatic memberBlock(Expression, Expression, Expression)Creates a BlockExpression that contains three expressions and has no variables.
Public methodStatic memberBlock(Type, IEnumerable<ParameterExpression>, IEnumerable<Expression>)Creates a BlockExpression that contains the given variables and expressions.
Public methodStatic memberBlock(Type, IEnumerable<ParameterExpression>, array<Expression>)Creates a BlockExpression that contains the given variables and expressions.
Public methodStatic memberBlock(Expression, Expression, Expression, Expression)Creates a BlockExpression that contains four expressions and has no variables.
Public methodStatic memberBlock(Expression, Expression, Expression, Expression, Expression)Creates a BlockExpression that contains five expressions and has no variables.
Public methodStatic memberBreak(LabelTarget)Creates a GotoExpression representing a break statement.
Public methodStatic memberBreak(LabelTarget, Expression)Creates a GotoExpression representing a break statement. The value passed to the label upon jumping can be specified.
Public methodStatic memberBreak(LabelTarget, Type)Creates a GotoExpression representing a break statement with the specified type.
Public methodStatic memberBreak(LabelTarget, Expression, Type)Creates a GotoExpression representing a break statement with the specified type. The value passed to the label upon jumping can be specified.
Public methodStatic memberCall(Expression, MethodInfo)Creates a MethodCallExpression that represents a call to an instance method that takes no arguments.
Public methodStatic memberCall(MethodInfo, IEnumerable<Expression>)Creates a MethodCallExpression that represents a call to a static (Shared in Visual Basic) method.
Public methodStatic memberCall(MethodInfo, Expression)Creates a MethodCallExpression that represents a call to a static (Shared in Visual Basic) method that takes one argument.
Public methodStatic memberCall(MethodInfo, array<Expression>)Creates a MethodCallExpression that represents a call to a static (Shared in Visual Basic) method that has arguments.
Public methodStatic memberCall(Expression, MethodInfo, IEnumerable<Expression>)Creates a MethodCallExpression that represents a call to a method that takes arguments.
Public methodStatic memberCall(Expression, MethodInfo, array<Expression>)Creates a MethodCallExpression that represents a call to a method that takes arguments.
Public methodStatic memberCall(MethodInfo, Expression, Expression)Creates a MethodCallExpression that represents a call to an static method that takes two arguments.
Public methodStatic memberCall(Expression, MethodInfo, Expression, Expression)Creates a MethodCallExpression that represents a call to a static method that takes two arguments.
Public methodStatic memberCall(Expression, String, array<Type>, array<Expression>)Creates a MethodCallExpression that represents a call to an instance method by calling the appropriate factory method.
Public methodStatic memberCall(MethodInfo, Expression, Expression, Expression)Creates a MethodCallExpression that represents a call to a static method that takes three arguments.
Public methodStatic memberCall(Type, String, array<Type>, array<Expression>)Creates a MethodCallExpression that represents a call to a static (Shared in Visual Basic) method by calling the appropriate factory method.
Public methodStatic memberCall(Expression, MethodInfo, Expression, Expression, Expression)Creates a MethodCallExpression that represents a call to a method that takes no arguments.
Public methodStatic memberCall(MethodInfo, Expression, Expression, Expression, Expression)Creates a MethodCallExpression that represents a call to a static method that takes four arguments.
Public methodStatic memberCall(MethodInfo, Expression, Expression, Expression, Expression, Expression)Creates a MethodCallExpression that represents a call to a static method that takes five arguments.
Public methodStatic memberCatch(ParameterExpression, Expression)Creates a CatchBlock representing a catch statement with a reference to the caught Exception object for use in the handler body.
Public methodStatic memberCatch(Type, Expression)Creates a CatchBlock representing a catch statement.
Public methodStatic memberCatch(ParameterExpression, Expression, Expression)Creates a CatchBlock representing a catch statement with an Exception filter and a reference to the caught Exception object.
Public methodStatic memberCatch(Type, Expression, Expression)Creates a CatchBlock representing a catch statement with an Exception filter but no reference to the caught Exception object.
Public methodStatic memberClearDebugInfoCreates a DebugInfoExpression for clearing a sequence point.
Public methodStatic memberCoalesce(Expression, Expression)Creates a BinaryExpression that represents a coalescing operation.
Public methodStatic memberCoalesce(Expression, Expression, LambdaExpression)Creates a BinaryExpression that represents a coalescing operation, given a conversion function.
Public methodStatic memberCondition(Expression, Expression, Expression)Creates a ConditionalExpression that represents a conditional statement.
Public methodStatic memberCondition(Expression, Expression, Expression, Type)Creates a ConditionalExpression that represents a conditional statement.
Public methodStatic memberConstant(Object)Creates a ConstantExpression that has the Value property set to the specified value.
Public methodStatic memberConstant(Object, Type)Creates a ConstantExpression that has the Value and Type properties set to the specified values.
Public methodStatic memberContinue(LabelTarget)Creates a GotoExpression representing a continue statement.
Public methodStatic memberContinue(LabelTarget, Type)Creates a GotoExpression representing a continue statement with the specified type.
Public methodStatic memberConvert(Expression, Type)Creates a UnaryExpression that represents a type conversion operation.
Public methodStatic memberConvert(Expression, Type, MethodInfo)Creates a UnaryExpression that represents a conversion operation for which the implementing method is specified.
Public methodStatic memberConvertChecked(Expression, Type)Creates a UnaryExpression that represents a conversion operation that throws an exception if the target type is overflowed.
Public methodStatic memberConvertChecked(Expression, Type, MethodInfo)Creates a UnaryExpression that represents a conversion operation that throws an exception if the target type is overflowed and for which the implementing method is specified.
Public methodStatic memberDebugInfoCreates a DebugInfoExpression with the specified span.
Public methodStatic memberDecrement(Expression)Creates a UnaryExpression that represents the decrementing of the expression by 1.
Public methodStatic memberDecrement(Expression, MethodInfo)Creates a UnaryExpression that represents the decrementing of the expression by 1.
Public methodStatic memberDefaultCreates a DefaultExpression that has the Type property set to the specified type.
Public methodStatic memberDivide(Expression, Expression)Creates a BinaryExpression that represents an arithmetic division operation.
Public methodStatic memberDivide(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents an arithmetic division operation. The implementing method can be specified.
Public methodStatic memberDivideAssign(Expression, Expression)Creates a BinaryExpression that represents a division assignment operation that does not have overflow checking.
Public methodStatic memberDivideAssign(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a division assignment operation that does not have overflow checking.
Public methodStatic memberDivideAssign(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents a division assignment operation that does not have overflow checking.
Public methodStatic memberElementInit(MethodInfo, IEnumerable<Expression>)Creates an ElementInit, given an IEnumerable<T> as the second argument.
Public methodStatic memberElementInit(MethodInfo, array<Expression>)Creates an ElementInit, given an array of values as the second argument.
Public methodStatic memberEmptyCreates an empty expression that has Void type.
Public methodStatic memberEqual(Expression, Expression)Creates a BinaryExpression that represents an equality comparison.
Public methodStatic memberEqual(Expression, Expression, Boolean, MethodInfo)Creates a BinaryExpression that represents an equality comparison. The implementing method can be specified.
Public methodEquals(Object)Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodStatic memberExclusiveOr(Expression, Expression)Creates a BinaryExpression that represents a bitwise XOR operation, using op_ExclusiveOr for user-defined types.
Public methodStatic memberExclusiveOr(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a bitwise XOR operation, using op_ExclusiveOr for user-defined types. The implementing method can be specified.
Public methodStatic memberExclusiveOrAssign(Expression, Expression)Creates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.
Public methodStatic memberExclusiveOrAssign(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.
Public methodStatic memberExclusiveOrAssign(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.
Public methodStatic memberField(Expression, FieldInfo)Creates a MemberExpression that represents accessing a field.
Public methodStatic memberField(Expression, String)Creates a MemberExpression that represents accessing a field given the name of the field.
Public methodStatic memberField(Expression, Type, String)Creates a MemberExpression that represents accessing a field.
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
Public methodStatic memberGetActionTypeCreates a Type object that represents a generic System.Action delegate type that has specific type arguments.
Public methodStatic memberGetDelegateTypeGets a Type object that represents a generic System.Func or System.Action delegate type that has specific type arguments.
Public methodStatic memberGetFuncTypeCreates a Type object that represents a generic System.Func delegate type that has specific type arguments. The last type argument specifies the return type of the created delegate.
Public methodGetHashCodeServes as a hash function for a particular type. (Inherited from Object.)
Public methodGetTypeGets the Type of the current instance. (Inherited from Object.)
Public methodStatic memberGoto(LabelTarget)Creates a GotoExpression representing a "go to" statement.
Public methodStatic memberGoto(LabelTarget, Expression)Creates a GotoExpression representing a "go to" statement. The value passed to the label upon jumping can be specified.
Public methodStatic memberGoto(LabelTarget, Type)Creates a GotoExpression representing a "go to" statement with the specified type.
Public methodStatic memberGoto(LabelTarget, Expression, Type)Creates a GotoExpression representing a "go to" statement with the specified type. The value passed to the label upon jumping can be specified.
Public methodStatic memberGreaterThan(Expression, Expression)Creates a BinaryExpression that represents a "greater than" numeric comparison.
Public methodStatic memberGreaterThan(Expression, Expression, Boolean, MethodInfo)Creates a BinaryExpression that represents a "greater than" numeric comparison. The implementing method can be specified.
Public methodStatic memberGreaterThanOrEqual(Expression, Expression)Creates a BinaryExpression that represents a "greater than or equal" numeric comparison.
Public methodStatic memberGreaterThanOrEqual(Expression, Expression, Boolean, MethodInfo)Creates a BinaryExpression that represents a "greater than or equal" numeric comparison.
Public methodStatic memberIfThenCreates a ConditionalExpression that represents a conditional block with an if statement.
Public methodStatic memberIfThenElseCreates a ConditionalExpression that represents a conditional block with if and else statements.
Public methodStatic memberIncrement(Expression)Creates a UnaryExpression that represents the incrementing of the expression value by 1.
Public methodStatic memberIncrement(Expression, MethodInfo)Creates a UnaryExpression that represents the incrementing of the expression by 1.
Public methodStatic memberInvoke(Expression, IEnumerable<Expression>)Creates an InvocationExpression that applies a delegate or lambda expression to a list of argument expressions.
Public methodStatic memberInvoke(Expression, array<Expression>)Creates an InvocationExpression that applies a delegate or lambda expression to a list of argument expressions.
Public methodStatic memberIsFalse(Expression)Returns whether the expression evaluates to false.
Public methodStatic memberIsFalse(Expression, MethodInfo)Returns whether the expression evaluates to false.
Public methodStatic memberIsTrue(Expression)Returns whether the expression evaluates to true.
Public methodStatic memberIsTrue(Expression, MethodInfo)Returns whether the expression evaluates to true.
Public methodStatic memberLabel()Creates a LabelTarget representing a label with void type and no name.
Public methodStatic memberLabel(LabelTarget)Creates a LabelExpression representing a label without a default value.
Public methodStatic memberLabel(String)Creates a LabelTarget representing a label with void type and the given name.
Public methodStatic memberLabel(Type)Creates a LabelTarget representing a label with the given type.
Public methodStatic memberLabel(LabelTarget, Expression)Creates a LabelExpression representing a label with the given default value.
Public methodStatic memberLabel(Type, String)Creates a LabelTarget representing a label with the given type and name.
Public methodStatic memberLambda(Expression, IEnumerable<ParameterExpression>)Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberLambda(Expression, array<ParameterExpression>)Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberLambda(Expression, Boolean, IEnumerable<ParameterExpression>)Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberLambda(Expression, Boolean, array<ParameterExpression>)Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberLambda(Expression, String, IEnumerable<ParameterExpression>)Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberLambda(Type, Expression, IEnumerable<ParameterExpression>)Creates a LambdaExpression by first constructing a delegate type. It can be used when the delegate type is not known at compile time.
Public methodStatic memberLambda(Type, Expression, array<ParameterExpression>)Creates a LambdaExpression by first constructing a delegate type. It can be used when the delegate type is not known at compile time.
Public methodStatic memberLambda(Expression, String, Boolean, IEnumerable<ParameterExpression>)Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberLambda(Type, Expression, Boolean, IEnumerable<ParameterExpression>)Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberLambda(Type, Expression, Boolean, array<ParameterExpression>)Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberLambda(Type, Expression, String, IEnumerable<ParameterExpression>)Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberLambda(Type, Expression, String, Boolean, IEnumerable<ParameterExpression>)Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberLambda<TDelegate>(Expression, IEnumerable<ParameterExpression>)Creates an Expression<TDelegate> where the delegate type is known at compile time.
Public methodStatic memberLambda<TDelegate>(Expression, array<ParameterExpression>)Creates an Expression<TDelegate> where the delegate type is known at compile time.
Public methodStatic memberLambda<TDelegate>(Expression, Boolean, IEnumerable<ParameterExpression>)Creates an Expression<TDelegate> where the delegate type is known at compile time.
Public methodStatic memberLambda<TDelegate>(Expression, Boolean, array<ParameterExpression>)Creates an Expression<TDelegate> where the delegate type is known at compile time.
Public methodStatic memberLambda<TDelegate>(Expression, String, IEnumerable<ParameterExpression>)Creates an Expression<TDelegate> where the delegate type is known at compile time.
Public methodStatic memberLambda<TDelegate>(Expression, String, Boolean, IEnumerable<ParameterExpression>)Creates an Expression<TDelegate> where the delegate type is known at compile time.
Public methodStatic memberLeftShift(Expression, Expression)Creates a BinaryExpression that represents a bitwise left-shift operation.
Public methodStatic memberLeftShift(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a bitwise left-shift operation.
Public methodStatic memberLeftShiftAssign(Expression, Expression)Creates a BinaryExpression that represents a bitwise left-shift assignment operation.
Public methodStatic memberLeftShiftAssign(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a bitwise left-shift assignment operation.
Public methodStatic memberLeftShiftAssign(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents a bitwise left-shift assignment operation.
Public methodStatic memberLessThan(Expression, Expression)Creates a BinaryExpression that represents a "less than" numeric comparison.
Public methodStatic memberLessThan(Expression, Expression, Boolean, MethodInfo)Creates a BinaryExpression that represents a "less than" numeric comparison.
Public methodStatic memberLessThanOrEqual(Expression, Expression)Creates a BinaryExpression that represents a " less than or equal" numeric comparison.
Public methodStatic memberLessThanOrEqual(Expression, Expression, Boolean, MethodInfo)Creates a BinaryExpression that represents a "less than or equal" numeric comparison.
Public methodStatic memberListBind(MemberInfo, IEnumerable<ElementInit>)Creates a MemberListBinding where the member is a field or property.
Public methodStatic memberListBind(MemberInfo, array<ElementInit>)Creates a MemberListBinding where the member is a field or property.
Public methodStatic memberListBind(MethodInfo, IEnumerable<ElementInit>)Creates a MemberListBinding based on a specified property accessor method.
Public methodStatic memberListBind(MethodInfo, array<ElementInit>)Creates a MemberListBinding object based on a specified property accessor method.
Public methodStatic memberListInit(NewExpression, IEnumerable<ElementInit>)Creates a ListInitExpression that uses specified ElementInit objects to initialize a collection.
Public methodStatic memberListInit(NewExpression, IEnumerable<Expression>)Creates a ListInitExpression that uses a method named "Add" to add elements to a collection.
Public methodStatic memberListInit(NewExpression, array<ElementInit>)Creates a ListInitExpression that uses specified ElementInit objects to initialize a collection.
Public methodStatic memberListInit(NewExpression, array<Expression>)Creates a ListInitExpression that uses a method named "Add" to add elements to a collection.
Public methodStatic memberListInit(NewExpression, MethodInfo, IEnumerable<Expression>)Creates a ListInitExpression that uses a specified method to add elements to a collection.
Public methodStatic memberListInit(NewExpression, MethodInfo, array<Expression>)Creates a ListInitExpression that uses a specified method to add elements to a collection.
Public methodStatic memberLoop(Expression)Creates a LoopExpression with the given body.
Public methodStatic memberLoop(Expression, LabelTarget)Creates a LoopExpression with the given body and break target.
Public methodStatic memberLoop(Expression, LabelTarget, LabelTarget)Creates a LoopExpression with the given body.
Public methodStatic memberMakeBinary(ExpressionType, Expression, Expression)Creates a BinaryExpression, given the left and right operands, by calling an appropriate factory method.
Public methodStatic memberMakeBinary(ExpressionType, Expression, Expression, Boolean, MethodInfo)Creates a BinaryExpression, given the left operand, right operand and implementing method, by calling the appropriate factory method.
Public methodStatic memberMakeBinary(ExpressionType, Expression, Expression, Boolean, MethodInfo, LambdaExpression)Creates a BinaryExpression, given the left operand, right operand, implementing method and type conversion function, by calling the appropriate factory method.
Public methodStatic memberMakeCatchBlockCreates a CatchBlock representing a catch statement with the specified elements.
Public methodStatic memberMakeGotoCreates a GotoExpression representing a jump of the specified GotoExpressionKind. The value passed to the label upon jumping can also be specified.
Public methodStatic memberMakeIndexCreates an IndexExpression that represents accessing an indexed property in an object.
Public methodStatic memberMakeMemberAccessCreates a MemberExpression that represents accessing either a field or a property.
Public methodStatic memberMakeTryCreates a TryExpression representing a try block with the specified elements.
Public methodStatic memberMakeUnary(ExpressionType, Expression, Type)Creates a UnaryExpression, given an operand, by calling the appropriate factory method.
Public methodStatic memberMakeUnary(ExpressionType, Expression, Type, MethodInfo)Creates a UnaryExpression, given an operand and implementing method, by calling the appropriate factory method.
Public methodStatic memberMemberBind(MemberInfo, IEnumerable<MemberBinding>)Creates a MemberMemberBinding that represents the recursive initialization of members of a field or property.
Public methodStatic memberMemberBind(MemberInfo, array<MemberBinding>)Creates a MemberMemberBinding that represents the recursive initialization of members of a field or property.
Public methodStatic memberMemberBind(MethodInfo, IEnumerable<MemberBinding>)Creates a MemberMemberBinding that represents the recursive initialization of members of a member that is accessed by using a property accessor method.
Public methodStatic memberMemberBind(MethodInfo, array<MemberBinding>)Creates a MemberMemberBinding that represents the recursive initialization of members of a member that is accessed by using a property accessor method.
Public methodStatic memberMemberInit(NewExpression, IEnumerable<MemberBinding>)Represents an expression that creates a new object and initializes a property of the object.
Public methodStatic memberMemberInit(NewExpression, array<MemberBinding>)Creates a MemberInitExpression.
Protected methodMemberwiseCloneCreates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberModulo(Expression, Expression)Creates a BinaryExpression that represents an arithmetic remainder operation.
Public methodStatic memberModulo(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents an arithmetic remainder operation.
Public methodStatic memberModuloAssign(Expression, Expression)Creates a BinaryExpression that represents a remainder assignment operation.
Public methodStatic memberModuloAssign(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a remainder assignment operation.
Public methodStatic memberModuloAssign(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents a remainder assignment operation.
Public methodStatic memberMultiply(Expression, Expression)Creates a BinaryExpression that represents an arithmetic multiplication operation that does not have overflow checking.
Public methodStatic memberMultiply(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents an arithmetic multiplication operation that does not have overflow checking.
Public methodStatic memberMultiplyAssign(Expression, Expression)Creates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.
Public methodStatic memberMultiplyAssign(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.
Public methodStatic memberMultiplyAssign(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.
Public methodStatic memberMultiplyAssignChecked(Expression, Expression)Creates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.
Public methodStatic memberMultiplyAssignChecked(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.
Public methodStatic memberMultiplyAssignChecked(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.
Public methodStatic memberMultiplyChecked(Expression, Expression)Creates a BinaryExpression that represents an arithmetic multiplication operation that has overflow checking.
Public methodStatic memberMultiplyChecked(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents an arithmetic multiplication operation that has overflow checking.
Public methodStatic memberNegate(Expression)Creates a UnaryExpression that represents an arithmetic negation operation.
Public methodStatic memberNegate(Expression, MethodInfo)Creates a UnaryExpression that represents an arithmetic negation operation.
Public methodStatic memberNegateChecked(Expression)Creates a UnaryExpression that represents an arithmetic negation operation that has overflow checking.
Public methodStatic memberNegateChecked(Expression, MethodInfo)Creates a UnaryExpression that represents an arithmetic negation operation that has overflow checking. The implementing method can be specified.
Public methodStatic memberNew(ConstructorInfo)Creates a NewExpression that represents calling the specified constructor that takes no arguments.
Public methodStatic memberNew(Type)Creates a NewExpression that represents calling the parameterless constructor of the specified type.
Public methodStatic memberNew(ConstructorInfo, IEnumerable<Expression>)Creates a NewExpression that represents calling the specified constructor with the specified arguments.
Public methodStatic memberNew(ConstructorInfo, array<Expression>)Creates a NewExpression that represents calling the specified constructor with the specified arguments.
Public methodStatic memberNew(ConstructorInfo, IEnumerable<Expression>, IEnumerable<MemberInfo>)Creates a NewExpression that represents calling the specified constructor with the specified arguments. The members that access the constructor initialized fields are specified.
Public methodStatic memberNew(ConstructorInfo, IEnumerable<Expression>, array<MemberInfo>)Creates a NewExpression that represents calling the specified constructor with the specified arguments. The members that access the constructor initialized fields are specified as an array.
Public methodStatic memberNewArrayBounds(Type, IEnumerable<Expression>)Creates a NewArrayExpression that represents creating an array that has a specified rank.
Public methodStatic memberNewArrayBounds(Type, array<Expression>)Creates a NewArrayExpression that represents creating an array that has a specified rank.
Public methodStatic memberNewArrayInit(Type, IEnumerable<Expression>)Creates a NewArrayExpression that represents creating a one-dimensional array and initializing it from a list of elements.
Public methodStatic memberNewArrayInit(Type, array<Expression>)Creates a NewArrayExpression that represents creating a one-dimensional array and initializing it from a list of elements.
Public methodStatic memberNot(Expression)Creates a UnaryExpression that represents a bitwise complement operation.
Public methodStatic memberNot(Expression, MethodInfo)Creates a UnaryExpression that represents a bitwise complement operation. The implementing method can be specified.
Public methodStatic memberNotEqual(Expression, Expression)Creates a BinaryExpression that represents an inequality comparison.
Public methodStatic memberNotEqual(Expression, Expression, Boolean, MethodInfo)Creates a BinaryExpression that represents an inequality comparison.
Public methodStatic memberOnesComplement(Expression)Returns the expression representing the ones complement.
Public methodStatic memberOnesComplement(Expression, MethodInfo)Returns the expression representing the ones complement.
Public methodStatic memberOr(Expression, Expression)Creates a BinaryExpression that represents a bitwise OR operation.
Public methodStatic memberOr(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a bitwise OR operation.
Public methodStatic memberOrAssign(Expression, Expression)Creates a BinaryExpression that represents a bitwise OR assignment operation.
Public methodStatic memberOrAssign(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a bitwise OR assignment operation.
Public methodStatic memberOrAssign(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents a bitwise OR assignment operation.
Public methodStatic memberOrElse(Expression, Expression)Creates a BinaryExpression that represents a conditional OR operation that evaluates the second operand only if the first operand evaluates to false.
Public methodStatic memberOrElse(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a conditional OR operation that evaluates the second operand only if the first operand evaluates to false.
Public methodStatic memberParameter(Type)Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.
Public methodStatic memberParameter(Type, String)Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.
Public methodStatic memberPostDecrementAssign(Expression)Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent decrement by 1 of the original expression.
Public methodStatic memberPostDecrementAssign(Expression, MethodInfo)Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent decrement by 1 of the original expression.
Public methodStatic memberPostIncrementAssign(Expression)Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent increment by 1 of the original expression.
Public methodStatic memberPostIncrementAssign(Expression, MethodInfo)Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent increment by 1 of the original expression.
Public methodStatic memberPower(Expression, Expression)Creates a BinaryExpression that represents raising a number to a power.
Public methodStatic memberPower(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents raising a number to a power.
Public methodStatic memberPowerAssign(Expression, Expression)Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.
Public methodStatic memberPowerAssign(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.
Public methodStatic memberPowerAssign(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.
Public methodStatic memberPreDecrementAssign(Expression)Creates a UnaryExpression that decrements the expression by 1 and assigns the result back to the expression.
Public methodStatic memberPreDecrementAssign(Expression, MethodInfo)Creates a UnaryExpression that decrements the expression by 1 and assigns the result back to the expression.
Public methodStatic memberPreIncrementAssign(Expression)Creates a UnaryExpression that increments the expression by 1 and assigns the result back to the expression.
Public methodStatic memberPreIncrementAssign(Expression, MethodInfo)Creates a UnaryExpression that increments the expression by 1 and assigns the result back to the expression.
Public methodStatic memberProperty(Expression, MethodInfo)Creates a MemberExpression that represents accessing a property by using a property accessor method.
Public methodStatic memberProperty(Expression, PropertyInfo)Creates a MemberExpression that represents accessing a property.
Public methodStatic memberProperty(Expression, String)Creates a MemberExpression that represents accessing a property.
Public methodStatic memberProperty(Expression, PropertyInfo, IEnumerable<Expression>)Creates an IndexExpression representing the access to an indexed property.
Public methodStatic memberProperty(Expression, PropertyInfo, array<Expression>)Creates an IndexExpression representing the access to an indexed property.
Public methodStatic memberProperty(Expression, String, array<Expression>)Creates an IndexExpression representing the access to an indexed property.
Public methodStatic memberProperty(Expression, Type, String)Creates a MemberExpression accessing a property.
Public methodStatic memberPropertyOrFieldCreates a MemberExpression that represents accessing a property or field.
Public methodStatic memberQuoteCreates a UnaryExpression that represents an expression that has a constant value of type Expression.
Public methodReduceReduces this node to a simpler expression. If CanReduce returns true, this should return a valid expression. This method can return another node which itself must be reduced.
Public methodReduceAndCheckReduces this node to a simpler expression. If CanReduce returns true, this should return a valid expression. This method can return another node which itself must be reduced.
Public methodReduceExtensionsReduces the expression to a known node type (that is not an Extension node) or just returns the expression if it is already a known type.
Public methodStatic memberReferenceEqualCreates a BinaryExpression that represents a reference equality comparison.
Public methodStatic memberReferenceNotEqualCreates a BinaryExpression that represents a reference inequality comparison.
Public methodStatic memberRethrow()Creates a UnaryExpression that represents a rethrowing of an exception.
Public methodStatic memberRethrow(Type)Creates a UnaryExpression that represents a rethrowing of an exception with a given type.
Public methodStatic memberReturn(LabelTarget)Creates a GotoExpression representing a return statement.
Public methodStatic memberReturn(LabelTarget, Expression)Creates a GotoExpression representing a return statement. The value passed to the label upon jumping can be specified.
Public methodStatic memberReturn(LabelTarget, Type)Creates a GotoExpression representing a return statement with the specified type.
Public methodStatic memberReturn(LabelTarget, Expression, Type)Creates a GotoExpression representing a return statement with the specified type. The value passed to the label upon jumping can be specified.
Public methodStatic memberRightShift(Expression, Expression)Creates a BinaryExpression that represents a bitwise right-shift operation.
Public methodStatic memberRightShift(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a bitwise right-shift operation.
Public methodStatic memberRightShiftAssign(Expression, Expression)Creates a BinaryExpression that represents a bitwise right-shift assignment operation.
Public methodStatic memberRightShiftAssign(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a bitwise right-shift assignment operation.
Public methodStatic memberRightShiftAssign(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents a bitwise right-shift assignment operation.
Public methodStatic memberRuntimeVariables(IEnumerable<ParameterExpression>)Creates an instance of RuntimeVariablesExpression.
Public methodStatic memberRuntimeVariables(array<ParameterExpression>)Creates an instance of RuntimeVariablesExpression.
Public methodStatic memberSubtract(Expression, Expression)Creates a BinaryExpression that represents an arithmetic subtraction operation that does not have overflow checking.
Public methodStatic memberSubtract(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents an arithmetic subtraction operation that does not have overflow checking.
Public methodStatic memberSubtractAssign(Expression, Expression)Creates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.
Public methodStatic memberSubtractAssign(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.
Public methodStatic memberSubtractAssign(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.
Public methodStatic memberSubtractAssignChecked(Expression, Expression)Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.
Public methodStatic memberSubtractAssignChecked(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.
Public methodStatic memberSubtractAssignChecked(Expression, Expression, MethodInfo, LambdaExpression)Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.
Public methodStatic memberSubtractChecked(Expression, Expression)Creates a BinaryExpression that represents an arithmetic subtraction operation that has overflow checking.
Public methodStatic memberSubtractChecked(Expression, Expression, MethodInfo)Creates a BinaryExpression that represents an arithmetic subtraction operation that has overflow checking.
Public methodStatic memberSwitch(Expression, array<SwitchCase>)Creates a SwitchExpression that represents a switch statement without a default case.
Public methodStatic memberSwitch(Expression, Expression, array<SwitchCase>)Creates a SwitchExpression that represents a switch statement that has a default case.
Public methodStatic memberSwitch(Expression, Expression, MethodInfo, IEnumerable<SwitchCase>)Creates a SwitchExpression that represents a switch statement that has a default case.
Public methodStatic memberSwitch(Expression, Expression, MethodInfo, array<SwitchCase>)Creates a SwitchExpression that represents a switch statement that has a default case.
Public methodStatic memberSwitch(Type, Expression, Expression, MethodInfo, IEnumerable<SwitchCase>)Creates a SwitchExpression that represents a switch statement that has a default case.
Public methodStatic memberSwitch(Type, Expression, Expression, MethodInfo, array<SwitchCase>)Creates a SwitchExpression that represents a switch statement that has a default case..
Public methodStatic memberSwitchCase(Expression, IEnumerable<Expression>)Creates a SwitchCase object to be used in a SwitchExpression object.
Public methodStatic memberSwitchCase(Expression, array<Expression>)Creates a SwitchCase for use in a SwitchExpression.
Public methodStatic memberSymbolDocument(String)Creates an instance of SymbolDocumentInfo.
Public methodStatic memberSymbolDocument(String, Guid)Creates an instance of SymbolDocumentInfo.
Public methodStatic memberSymbolDocument(String, Guid, Guid)Creates an instance of SymbolDocumentInfo.
Public methodStatic memberSymbolDocument(String, Guid, Guid, Guid)Creates an instance of SymbolDocumentInfo.
Public methodStatic memberThrow(Expression)Creates a UnaryExpression that represents a throwing of an exception.
Public methodStatic memberThrow(Expression, Type)Creates a UnaryExpression that represents a throwing of an exception with a given type.
Public methodToStringReturns a textual representation of the Expression. (Overrides Object::ToString().)
Public methodStatic memberTryCatchCreates a TryExpression representing a try block with any number of catch statements and neither a fault nor finally block.
Public methodStatic memberTryCatchFinallyCreates a TryExpression representing a try block with any number of catch statements and a finally block.
Public methodStatic memberTryFaultCreates a TryExpression representing a try block with a fault block and no catch statements.
Public methodStatic memberTryFinallyCreates a TryExpression representing a try block with a finally block and no catch statements.
Public methodStatic memberTryGetActionTypeCreates a Type object that represents a generic System.Action delegate type that has specific type arguments.
Public methodStatic memberTryGetFuncTypeCreates a Type object that represents a generic System.Func delegate type that has specific type arguments. The last type argument specifies the return type of the created delegate.
Public methodStatic memberTypeAsCreates a UnaryExpression that represents an explicit reference or boxing conversion where nullptr is supplied if the conversion fails.
Public methodStatic memberTypeEqualCreates a TypeBinaryExpression that compares run-time type identity.
Public methodStatic memberTypeIsCreates a TypeBinaryExpression.
Public methodStatic memberUnaryPlus(Expression)Creates a UnaryExpression that represents a unary plus operation.
Public methodStatic memberUnaryPlus(Expression, MethodInfo)Creates a UnaryExpression that represents a unary plus operation.
Public methodStatic memberUnboxCreates a UnaryExpression that represents an explicit unboxing.
Public methodStatic memberVariable(Type)Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.
Public methodStatic memberVariable(Type, String)Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.
Protected methodVisitChildrenReduces the node and then calls the visitor delegate on the reduced expression. The method throws an exception if the node is not reducible.
Top

The following code example shows how to create a block expression. The block expression consists of two MethodCallExpression objects and one ConstantExpression object.

No code example is currently available or this language may not be supported.

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Show:
© 2017 Microsoft