Поделиться через


Expression Class

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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.

Inheritance Hierarchy

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

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

Syntax

'Declaration
Public MustInherit Class Expression
public abstract class Expression

The Expression type exposes the following members.

Constructors

  Name Description
Protected method Expression() Constructs a new instance of Expression.
Protected methodSupported by Silverlight for Windows Phone Expression(ExpressionType, Type) Obsolete. Initializes a new instance of the Expression class.

Top

Properties

  Name Description
Public property CanReduce Indicates that the node can be reduced to a simpler node. If this returns true, Reduce() can be called to produce the reduced form.
Public propertySupported by Silverlight for Windows Phone NodeType Gets the node type of this Expression.
Public propertySupported by Silverlight for Windows Phone Type Gets the static type of the expression that this Expression represents.

Top

Methods

  Name Description
Protected method Accept Dispatches to the specific visit method for this node type. For example, MethodCallExpression calls the VisitMethodCall.
Public methodStatic memberSupported by Silverlight for Windows Phone Add(Expression, Expression) Creates a BinaryExpression that represents an arithmetic addition operation that does not have overflow checking.
Public methodStatic memberSupported by Silverlight for Windows Phone Add(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 member AddAssign(Expression, Expression) Creates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.
Public methodStatic member AddAssign(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.
Public methodStatic member AddAssign(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.
Public methodStatic member AddAssignChecked(Expression, Expression) Creates a BinaryExpression that represents an addition assignment operation that has overflow checking.
Public methodStatic member AddAssignChecked(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents an addition assignment operation that has overflow checking.
Public methodStatic member AddAssignChecked(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents an addition assignment operation that has overflow checking.
Public methodStatic memberSupported by Silverlight for Windows Phone AddChecked(Expression, Expression) Creates a BinaryExpression that represents an arithmetic addition operation that has overflow checking.
Public methodStatic memberSupported by Silverlight for Windows Phone AddChecked(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents an arithmetic addition operation that has overflow checking. The implementing method can be specified.
Public methodStatic memberSupported by Silverlight for Windows Phone And(Expression, Expression) Creates a BinaryExpression that represents a bitwise AND operation.
Public methodStatic memberSupported by Silverlight for Windows Phone And(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a bitwise AND operation. The implementing method can be specified.
Public methodStatic memberSupported by Silverlight for Windows Phone AndAlso(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 memberSupported by Silverlight for Windows Phone AndAlso(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 member AndAssign(Expression, Expression) Creates a BinaryExpression that represents a bitwise AND assignment operation.
Public methodStatic member AndAssign(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a bitwise AND assignment operation.
Public methodStatic member AndAssign(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents a bitwise AND assignment operation.
Public methodStatic member ArrayAccess(Expression, IEnumerable<Expression>) Creates an IndexExpression to access a multidimensional array.
Public methodStatic member ArrayAccess(Expression, array<Expression[]) Creates an IndexExpression to access an array.
Public methodStatic memberSupported by Silverlight for Windows Phone ArrayIndex(Expression, IEnumerable<Expression>) Creates a MethodCallExpression that represents applying an array index operator to an array of rank more than one.
Public methodStatic memberSupported by Silverlight for Windows Phone ArrayIndex(Expression, Expression) Creates a BinaryExpression that represents applying an array index operator to an array of rank one.
Public methodStatic memberSupported by Silverlight for Windows Phone ArrayIndex(Expression, array<Expression[]) Creates a MethodCallExpression that represents applying an array index operator to a multidimensional array.
Public methodStatic memberSupported by Silverlight for Windows Phone ArrayLength Creates a UnaryExpression that represents an expression for obtaining the length of a one-dimensional array.
Public methodStatic member Assign Creates a BinaryExpression that represents an assignment operation.
Public methodStatic memberSupported by Silverlight for Windows Phone Bind(MemberInfo, Expression) Creates a MemberAssignment that represents the initialization of a field or property.
Public methodStatic memberSupported by Silverlight for Windows Phone Bind(MethodInfo, Expression) Creates a MemberAssignment that represents the initialization of a member by using a property accessor method.
Public methodStatic member Block(array<Expression[]) Creates a BlockExpression that contains the given expressions and has no variables.
Public methodStatic member Block(IEnumerable<Expression>) Creates a BlockExpression that contains the given expressions and has no variables.
Public methodStatic member Block(Expression, Expression) Creates a BlockExpression that contains two expressions and has no variables.
Public methodStatic member Block(IEnumerable<ParameterExpression>, IEnumerable<Expression>) Creates a BlockExpression that contains the given variables and expressions.
Public methodStatic member Block(IEnumerable<ParameterExpression>, array<Expression[]) Creates a BlockExpression that contains the given variables and expressions.
Public methodStatic member Block(Type, IEnumerable<Expression>) Creates a BlockExpression that contains the given expressions, has no variables and has specific result type.
Public methodStatic member Block(Type, array<Expression[]) Creates a BlockExpression that contains the given expressions, has no variables and has specific result type.
Public methodStatic member Block(Expression, Expression, Expression) Creates a BlockExpression that contains three expressions and has no variables.
Public methodStatic member Block(Type, IEnumerable<ParameterExpression>, IEnumerable<Expression>) Creates a BlockExpression that contains the given variables and expressions.
Public methodStatic member Block(Type, IEnumerable<ParameterExpression>, array<Expression[]) Creates a BlockExpression that contains the given variables and expressions.
Public methodStatic member Block(Expression, Expression, Expression, Expression) Creates a BlockExpression that contains four expressions and has no variables.
Public methodStatic member Block(Expression, Expression, Expression, Expression, Expression) Creates a BlockExpression that contains five expressions and has no variables.
Public methodStatic member Break(LabelTarget) Creates a GotoExpression representing a break statement.
Public methodStatic member Break(LabelTarget, Expression) Creates a GotoExpression representing a break statement. The value passed to the label upon jumping can be specified.
Public methodStatic member Break(LabelTarget, Type) Creates a GotoExpression representing a break statement with the specified type.
Public methodStatic member Break(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 memberSupported by Silverlight for Windows Phone Call(Expression, MethodInfo) Creates a MethodCallExpression that represents a call to an instance method that takes no arguments.
Public methodStatic member Call(MethodInfo, IEnumerable<Expression>) Creates a MethodCallExpression that represents a call to a static (Shared in Visual Basic) method.
Public methodStatic member Call(MethodInfo, Expression) Creates a MethodCallExpression that represents a call to a static (Shared in Visual Basic) method that takes one argument.
Public methodStatic memberSupported by Silverlight for Windows Phone Call(MethodInfo, array<Expression[]) Creates a MethodCallExpression that represents a call to a static (Shared in Visual Basic) method that has arguments.
Public methodStatic memberSupported by Silverlight for Windows Phone Call(Expression, MethodInfo, IEnumerable<Expression>) Creates a MethodCallExpression that represents a call to a method that takes arguments.
Public methodStatic memberSupported by Silverlight for Windows Phone Call(Expression, MethodInfo, array<Expression[]) Creates a MethodCallExpression that represents a call to a method that takes arguments.
Public methodStatic member Call(MethodInfo, Expression, Expression) Creates a MethodCallExpression that represents a call to an static method that takes two arguments.
Public methodStatic member Call(Expression, MethodInfo, Expression, Expression) Creates a MethodCallExpression that represents a call to a static method that takes two arguments.
Public methodStatic memberSupported by Silverlight for Windows Phone Call(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 member Call(MethodInfo, Expression, Expression, Expression) Creates a MethodCallExpression that represents a call to a static method that takes three arguments.
Public methodStatic memberSupported by Silverlight for Windows Phone Call(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 member Call(Expression, MethodInfo, Expression, Expression, Expression) Creates a MethodCallExpression that represents a call to a method that takes no arguments.
Public methodStatic member Call(MethodInfo, Expression, Expression, Expression, Expression) Creates a MethodCallExpression that represents a call to a static method that takes four arguments.
Public methodStatic member Call(MethodInfo, Expression, Expression, Expression, Expression, Expression) Creates a MethodCallExpression that represents a call to a static method that takes five arguments.
Public methodStatic member Catch(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 member Catch(Type, Expression) Creates a CatchBlock representing a catch statement.
Public methodStatic member Catch(ParameterExpression, Expression, Expression) Creates a CatchBlock representing a catch statement with an Exception filter and a reference to the caught Exception object.
Public methodStatic member Catch(Type, Expression, Expression) Creates a CatchBlock representing a catch statement with an Exception filter but no reference to the caught Exception object.
Public methodStatic member ClearDebugInfo Creates a DebugInfoExpression for clearing a sequence point.
Public methodStatic memberSupported by Silverlight for Windows Phone Coalesce(Expression, Expression) Creates a BinaryExpression that represents a coalescing operation.
Public methodStatic memberSupported by Silverlight for Windows Phone Coalesce(Expression, Expression, LambdaExpression) Creates a BinaryExpression that represents a coalescing operation, given a conversion function.
Public methodStatic memberSupported by Silverlight for Windows Phone Condition(Expression, Expression, Expression) Creates a ConditionalExpression that represents a conditional statement.
Public methodStatic member Condition(Expression, Expression, Expression, Type) Creates a ConditionalExpression that represents a conditional statement.
Public methodStatic memberSupported by Silverlight for Windows Phone Constant(Object) Creates a ConstantExpression that has the Value property set to the specified value.
Public methodStatic memberSupported by Silverlight for Windows Phone Constant(Object, Type) Creates a ConstantExpression that has the Value and Type properties set to the specified values.
Public methodStatic member Continue(LabelTarget) Creates a GotoExpression representing a continue statement.
Public methodStatic member Continue(LabelTarget, Type) Creates a GotoExpression representing a continue statement with the specified type.
Public methodStatic memberSupported by Silverlight for Windows Phone Convert(Expression, Type) Creates a UnaryExpression that represents a type conversion operation.
Public methodStatic memberSupported by Silverlight for Windows Phone Convert(Expression, Type, MethodInfo) Creates a UnaryExpression that represents a conversion operation for which the implementing method is specified.
Public methodStatic memberSupported by Silverlight for Windows Phone ConvertChecked(Expression, Type) Creates a UnaryExpression that represents a conversion operation that throws an exception if the target type is overflowed.
Public methodStatic memberSupported by Silverlight for Windows Phone ConvertChecked(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 member DebugInfo Creates a DebugInfoExpression with the specified span.
Public methodStatic member Decrement(Expression) Creates a UnaryExpression that represents the decrementing of the expression by 1.
Public methodStatic member Decrement(Expression, MethodInfo) Creates a UnaryExpression that represents the decrementing of the expression by 1.
Public methodStatic member Default Creates a DefaultExpression that has the Type property set to the specified type.
Public methodStatic memberSupported by Silverlight for Windows Phone Divide(Expression, Expression) Creates a BinaryExpression that represents an arithmetic division operation.
Public methodStatic memberSupported by Silverlight for Windows Phone Divide(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents an arithmetic division operation. The implementing method can be specified.
Public methodStatic member DivideAssign(Expression, Expression) Creates a BinaryExpression that represents a division assignment operation that does not have overflow checking.
Public methodStatic member DivideAssign(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a division assignment operation that does not have overflow checking.
Public methodStatic member DivideAssign(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents a division assignment operation that does not have overflow checking.
Public methodStatic member Dynamic(CallSiteBinder, Type, IEnumerable<Expression>) Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.
Public methodStatic member Dynamic(CallSiteBinder, Type, Expression) Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.
Public methodStatic member Dynamic(CallSiteBinder, Type, array<Expression[]) Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.
Public methodStatic member Dynamic(CallSiteBinder, Type, Expression, Expression) Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.
Public methodStatic member Dynamic(CallSiteBinder, Type, Expression, Expression, Expression) Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.
Public methodStatic member Dynamic(CallSiteBinder, Type, Expression, Expression, Expression, Expression) Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.
Public methodStatic memberSupported by Silverlight for Windows Phone ElementInit(MethodInfo, IEnumerable<Expression>) Creates an ElementInit, given an IEnumerable<T> as the second argument.
Public methodStatic memberSupported by Silverlight for Windows Phone ElementInit(MethodInfo, array<Expression[]) Creates an ElementInit, given an array of values as the second argument.
Public methodStatic member Empty Creates an empty expression that has Void type.
Public methodStatic memberSupported by Silverlight for Windows Phone Equal(Expression, Expression) Creates a BinaryExpression that represents an equality comparison.
Public methodStatic memberSupported by Silverlight for Windows Phone Equal(Expression, Expression, Boolean, MethodInfo) Creates a BinaryExpression that represents an equality comparison. The implementing method can be specified.
Public methodSupported by Silverlight for Windows Phone Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Public methodStatic memberSupported by Silverlight for Windows Phone ExclusiveOr(Expression, Expression) Creates a BinaryExpression that represents a bitwise XOR operation, using op_ExclusiveOr for user-defined types.
Public methodStatic memberSupported by Silverlight for Windows Phone ExclusiveOr(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 member ExclusiveOrAssign(Expression, Expression) Creates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.
Public methodStatic member ExclusiveOrAssign(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.
Public methodStatic member ExclusiveOrAssign(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.
Public methodStatic memberSupported by Silverlight for Windows Phone Field(Expression, FieldInfo) Creates a MemberExpression that represents accessing a field.
Public methodStatic memberSupported by Silverlight for Windows Phone Field(Expression, String) Creates a MemberExpression that represents accessing a field given the name of the field.
Public methodStatic member Field(Expression, Type, String) Creates a MemberExpression that represents accessing a field.
Protected methodSupported by Silverlight for Windows Phone Finalize Allows 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 memberSupported by Silverlight for Windows Phone GetActionType Creates a Type object that represents a generic System.Action delegate type that has specific type arguments.
Public methodStatic member GetDelegateType Gets a Type object that represents a generic System.Func or System.Action delegate type that has specific type arguments.
Public methodStatic memberSupported by Silverlight for Windows Phone GetFuncType Creates 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 methodSupported by Silverlight for Windows Phone GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
Public methodSupported by Silverlight for Windows Phone GetType Gets the Type of the current instance. (Inherited from Object.)
Public methodStatic member Goto(LabelTarget) Creates a GotoExpression representing a "go to" statement.
Public methodStatic member Goto(LabelTarget, Expression) Creates a GotoExpression representing a "go to" statement. The value passed to the label upon jumping can be specified.
Public methodStatic member Goto(LabelTarget, Type) Creates a GotoExpression representing a "go to" statement with the specified type.
Public methodStatic member Goto(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 memberSupported by Silverlight for Windows Phone GreaterThan(Expression, Expression) Creates a BinaryExpression that represents a "greater than" numeric comparison.
Public methodStatic memberSupported by Silverlight for Windows Phone GreaterThan(Expression, Expression, Boolean, MethodInfo) Creates a BinaryExpression that represents a "greater than" numeric comparison. The implementing method can be specified.
Public methodStatic memberSupported by Silverlight for Windows Phone GreaterThanOrEqual(Expression, Expression) Creates a BinaryExpression that represents a "greater than or equal" numeric comparison.
Public methodStatic memberSupported by Silverlight for Windows Phone GreaterThanOrEqual(Expression, Expression, Boolean, MethodInfo) Creates a BinaryExpression that represents a "greater than or equal" numeric comparison.
Public methodStatic member IfThen Creates a ConditionalExpression that represents a conditional block with an if statement.
Public methodStatic member IfThenElse Creates a ConditionalExpression that represents a conditional block with if and else statements.
Public methodStatic member Increment(Expression) Creates a UnaryExpression that represents the incrementing of the expression value by 1.
Public methodStatic member Increment(Expression, MethodInfo) Creates a UnaryExpression that represents the incrementing of the expression by 1.
Public methodStatic memberSupported by Silverlight for Windows Phone Invoke(Expression, IEnumerable<Expression>) Creates an InvocationExpression that applies a delegate or lambda expression to a list of argument expressions.
Public methodStatic memberSupported by Silverlight for Windows Phone Invoke(Expression, array<Expression[]) Creates an InvocationExpression that applies a delegate or lambda expression to a list of argument expressions.
Public methodStatic member IsFalse(Expression) Returns whether the expression evaluates to false.
Public methodStatic member IsFalse(Expression, MethodInfo) Returns whether the expression evaluates to false.
Public methodStatic member IsTrue(Expression) Returns whether the expression evaluates to true.
Public methodStatic member IsTrue(Expression, MethodInfo) Returns whether the expression evaluates to true.
Public methodStatic member Label() Creates a LabelTarget representing a label with void type and no name.
Public methodStatic member Label(LabelTarget) Creates a LabelExpression representing a label without a default value.
Public methodStatic member Label(String) Creates a LabelTarget representing a label with void type and the given name.
Public methodStatic member Label(Type) Creates a LabelTarget representing a label with the given type.
Public methodStatic member Label(LabelTarget, Expression) Creates a LabelExpression representing a label with the given default value.
Public methodStatic member Label(Type, String) Creates a LabelTarget representing a label with the given type and name.
Public methodStatic member Lambda(Expression, IEnumerable<ParameterExpression>) Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberSupported by Silverlight for Windows Phone Lambda(Expression, array<ParameterExpression[]) Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic member Lambda(Expression, Boolean, IEnumerable<ParameterExpression>) Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic member Lambda(Expression, Boolean, array<ParameterExpression[]) Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic member Lambda(Expression, String, IEnumerable<ParameterExpression>) Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberSupported by Silverlight for Windows Phone Lambda(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 memberSupported by Silverlight for Windows Phone Lambda(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 member Lambda(Expression, String, Boolean, IEnumerable<ParameterExpression>) Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic member Lambda(Type, Expression, Boolean, IEnumerable<ParameterExpression>) Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic member Lambda(Type, Expression, Boolean, array<ParameterExpression[]) Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic member Lambda(Type, Expression, String, IEnumerable<ParameterExpression>) Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic member Lambda(Type, Expression, String, Boolean, IEnumerable<ParameterExpression>) Creates a LambdaExpression by first constructing a delegate type.
Public methodStatic memberSupported by Silverlight for Windows Phone Lambda<TDelegate>(Expression, IEnumerable<ParameterExpression>) Creates an Expression<TDelegate> where the delegate type is known at compile time.
Public methodStatic memberSupported by Silverlight for Windows Phone Lambda<TDelegate>(Expression, array<ParameterExpression[]) Creates an Expression<TDelegate> where the delegate type is known at compile time.
Public methodStatic member Lambda<TDelegate>(Expression, Boolean, IEnumerable<ParameterExpression>) Creates an Expression<TDelegate> where the delegate type is known at compile time.
Public methodStatic member Lambda<TDelegate>(Expression, Boolean, array<ParameterExpression[]) Creates an Expression<TDelegate> where the delegate type is known at compile time.
Public methodStatic member Lambda<TDelegate>(Expression, String, IEnumerable<ParameterExpression>) Creates an Expression<TDelegate> where the delegate type is known at compile time.
Public methodStatic member Lambda<TDelegate>(Expression, String, Boolean, IEnumerable<ParameterExpression>) Creates an Expression<TDelegate> where the delegate type is known at compile time.
Public methodStatic memberSupported by Silverlight for Windows Phone LeftShift(Expression, Expression) Creates a BinaryExpression that represents a bitwise left-shift operation.
Public methodStatic memberSupported by Silverlight for Windows Phone LeftShift(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a bitwise left-shift operation.
Public methodStatic member LeftShiftAssign(Expression, Expression) Creates a BinaryExpression that represents a bitwise left-shift assignment operation.
Public methodStatic member LeftShiftAssign(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a bitwise left-shift assignment operation.
Public methodStatic member LeftShiftAssign(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents a bitwise left-shift assignment operation.
Public methodStatic memberSupported by Silverlight for Windows Phone LessThan(Expression, Expression) Creates a BinaryExpression that represents a "less than" numeric comparison.
Public methodStatic memberSupported by Silverlight for Windows Phone LessThan(Expression, Expression, Boolean, MethodInfo) Creates a BinaryExpression that represents a "less than" numeric comparison.
Public methodStatic memberSupported by Silverlight for Windows Phone LessThanOrEqual(Expression, Expression) Creates a BinaryExpression that represents a " less than or equal" numeric comparison.
Public methodStatic memberSupported by Silverlight for Windows Phone LessThanOrEqual(Expression, Expression, Boolean, MethodInfo) Creates a BinaryExpression that represents a "less than or equal" numeric comparison.
Public methodStatic memberSupported by Silverlight for Windows Phone ListBind(MemberInfo, IEnumerable<ElementInit>) Creates a MemberListBinding where the member is a field or property.
Public methodStatic memberSupported by Silverlight for Windows Phone ListBind(MemberInfo, array<ElementInit[]) Creates a MemberListBinding where the member is a field or property.
Public methodStatic memberSupported by Silverlight for Windows Phone ListBind(MethodInfo, IEnumerable<ElementInit>) Creates a MemberListBinding based on a specified property accessor method.
Public methodStatic memberSupported by Silverlight for Windows Phone ListBind(MethodInfo, array<ElementInit[]) Creates a MemberListBinding object based on a specified property accessor method.
Public methodStatic memberSupported by Silverlight for Windows Phone ListInit(NewExpression, IEnumerable<ElementInit>) Creates a ListInitExpression that uses specified ElementInit objects to initialize a collection.
Public methodStatic memberSupported by Silverlight for Windows Phone ListInit(NewExpression, IEnumerable<Expression>) Creates a ListInitExpression that uses a method named "Add" to add elements to a collection.
Public methodStatic memberSupported by Silverlight for Windows Phone ListInit(NewExpression, array<ElementInit[]) Creates a ListInitExpression that uses specified ElementInit objects to initialize a collection.
Public methodStatic memberSupported by Silverlight for Windows Phone ListInit(NewExpression, array<Expression[]) Creates a ListInitExpression that uses a method named "Add" to add elements to a collection.
Public methodStatic memberSupported by Silverlight for Windows Phone ListInit(NewExpression, MethodInfo, IEnumerable<Expression>) Creates a ListInitExpression that uses a specified method to add elements to a collection.
Public methodStatic memberSupported by Silverlight for Windows Phone ListInit(NewExpression, MethodInfo, array<Expression[]) Creates a ListInitExpression that uses a specified method to add elements to a collection.
Public methodStatic member Loop(Expression) Creates a LoopExpression with the given body.
Public methodStatic member Loop(Expression, LabelTarget) Creates a LoopExpression with the given body and break target.
Public methodStatic member Loop(Expression, LabelTarget, LabelTarget) Creates a LoopExpression with the given body.
Public methodStatic memberSupported by Silverlight for Windows Phone MakeBinary(ExpressionType, Expression, Expression) Creates a BinaryExpression, given the left and right operands, by calling an appropriate factory method.
Public methodStatic memberSupported by Silverlight for Windows Phone MakeBinary(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 memberSupported by Silverlight for Windows Phone MakeBinary(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 member MakeCatchBlock Creates a CatchBlock representing a catch statement with the specified elements.
Public methodStatic member MakeDynamic(Type, CallSiteBinder, IEnumerable<Expression>) Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.
Public methodStatic member MakeDynamic(Type, CallSiteBinder, Expression) Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and one argument.
Public methodStatic member MakeDynamic(Type, CallSiteBinder, array<Expression[]) Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.
Public methodStatic member MakeDynamic(Type, CallSiteBinder, Expression, Expression) Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and two arguments.
Public methodStatic member MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression) Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and three arguments.
Public methodStatic member MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression, Expression) Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and four arguments.
Public methodStatic member MakeGoto Creates a GotoExpression representing a jump of the specified GotoExpressionKind. The value passed to the label upon jumping can also be specified.
Public methodStatic member MakeIndex Creates an IndexExpression that represents accessing an indexed property in an object.
Public methodStatic memberSupported by Silverlight for Windows Phone MakeMemberAccess Creates a MemberExpression that represents accessing either a field or a property.
Public methodStatic member MakeTry Creates a TryExpression representing a try block with the specified elements.
Public methodStatic memberSupported by Silverlight for Windows Phone MakeUnary(ExpressionType, Expression, Type) Creates a UnaryExpression, given an operand, by calling the appropriate factory method.
Public methodStatic memberSupported by Silverlight for Windows Phone MakeUnary(ExpressionType, Expression, Type, MethodInfo) Creates a UnaryExpression, given an operand and implementing method, by calling the appropriate factory method.
Public methodStatic memberSupported by Silverlight for Windows Phone MemberBind(MemberInfo, IEnumerable<MemberBinding>) Creates a MemberMemberBinding that represents the recursive initialization of members of a field or property.
Public methodStatic memberSupported by Silverlight for Windows Phone MemberBind(MemberInfo, array<MemberBinding[]) Creates a MemberMemberBinding that represents the recursive initialization of members of a field or property.
Public methodStatic memberSupported by Silverlight for Windows Phone MemberBind(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 memberSupported by Silverlight for Windows Phone MemberBind(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 memberSupported by Silverlight for Windows Phone MemberInit(NewExpression, IEnumerable<MemberBinding>) Represents an expression that creates a new object and initializes a property of the object.
Public methodStatic memberSupported by Silverlight for Windows Phone MemberInit(NewExpression, array<MemberBinding[]) Creates a MemberInitExpression.
Protected methodSupported by Silverlight for Windows Phone MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
Public methodStatic memberSupported by Silverlight for Windows Phone Modulo(Expression, Expression) Creates a BinaryExpression that represents an arithmetic remainder operation.
Public methodStatic memberSupported by Silverlight for Windows Phone Modulo(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents an arithmetic remainder operation.
Public methodStatic member ModuloAssign(Expression, Expression) Creates a BinaryExpression that represents a remainder assignment operation.
Public methodStatic member ModuloAssign(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a remainder assignment operation.
Public methodStatic member ModuloAssign(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents a remainder assignment operation.
Public methodStatic memberSupported by Silverlight for Windows Phone Multiply(Expression, Expression) Creates a BinaryExpression that represents an arithmetic multiplication operation that does not have overflow checking.
Public methodStatic memberSupported by Silverlight for Windows Phone Multiply(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents an arithmetic multiplication operation that does not have overflow checking.
Public methodStatic member MultiplyAssign(Expression, Expression) Creates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.
Public methodStatic member MultiplyAssign(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.
Public methodStatic member MultiplyAssign(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.
Public methodStatic member MultiplyAssignChecked(Expression, Expression) Creates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.
Public methodStatic member MultiplyAssignChecked(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.
Public methodStatic member MultiplyAssignChecked(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.
Public methodStatic memberSupported by Silverlight for Windows Phone MultiplyChecked(Expression, Expression) Creates a BinaryExpression that represents an arithmetic multiplication operation that has overflow checking.
Public methodStatic memberSupported by Silverlight for Windows Phone MultiplyChecked(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents an arithmetic multiplication operation that has overflow checking.
Public methodStatic memberSupported by Silverlight for Windows Phone Negate(Expression) Creates a UnaryExpression that represents an arithmetic negation operation.
Public methodStatic memberSupported by Silverlight for Windows Phone Negate(Expression, MethodInfo) Creates a UnaryExpression that represents an arithmetic negation operation.
Public methodStatic memberSupported by Silverlight for Windows Phone NegateChecked(Expression) Creates a UnaryExpression that represents an arithmetic negation operation that has overflow checking.
Public methodStatic memberSupported by Silverlight for Windows Phone NegateChecked(Expression, MethodInfo) Creates a UnaryExpression that represents an arithmetic negation operation that has overflow checking. The implementing method can be specified.
Public methodStatic memberSupported by Silverlight for Windows Phone New(ConstructorInfo) Creates a NewExpression that represents calling the specified constructor that takes no arguments.
Public methodStatic memberSupported by Silverlight for Windows Phone New(Type) Creates a NewExpression that represents calling the parameterless constructor of the specified type.
Public methodStatic memberSupported by Silverlight for Windows Phone New(ConstructorInfo, IEnumerable<Expression>) Creates a NewExpression that represents calling the specified constructor with the specified arguments.
Public methodStatic memberSupported by Silverlight for Windows Phone New(ConstructorInfo, array<Expression[]) Creates a NewExpression that represents calling the specified constructor with the specified arguments.
Public methodStatic memberSupported by Silverlight for Windows Phone New(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 memberSupported by Silverlight for Windows Phone New(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 memberSupported by Silverlight for Windows Phone NewArrayBounds(Type, IEnumerable<Expression>) Creates a NewArrayExpression that represents creating an array that has a specified rank.
Public methodStatic memberSupported by Silverlight for Windows Phone NewArrayBounds(Type, array<Expression[]) Creates a NewArrayExpression that represents creating an array that has a specified rank.
Public methodStatic memberSupported by Silverlight for Windows Phone NewArrayInit(Type, IEnumerable<Expression>) Creates a NewArrayExpression that represents creating a one-dimensional array and initializing it from a list of elements.
Public methodStatic memberSupported by Silverlight for Windows Phone NewArrayInit(Type, array<Expression[]) Creates a NewArrayExpression that represents creating a one-dimensional array and initializing it from a list of elements.
Public methodStatic memberSupported by Silverlight for Windows Phone Not(Expression) Creates a UnaryExpression that represents a bitwise complement operation.
Public methodStatic memberSupported by Silverlight for Windows Phone Not(Expression, MethodInfo) Creates a UnaryExpression that represents a bitwise complement operation. The implementing method can be specified.
Public methodStatic memberSupported by Silverlight for Windows Phone NotEqual(Expression, Expression) Creates a BinaryExpression that represents an inequality comparison.
Public methodStatic memberSupported by Silverlight for Windows Phone NotEqual(Expression, Expression, Boolean, MethodInfo) Creates a BinaryExpression that represents an inequality comparison.
Public methodStatic member OnesComplement(Expression) Returns the expression representing the ones complement.
Public methodStatic member OnesComplement(Expression, MethodInfo) Returns the expression representing the ones complement.
Public methodStatic memberSupported by Silverlight for Windows Phone Or(Expression, Expression) Creates a BinaryExpression that represents a bitwise OR operation.
Public methodStatic memberSupported by Silverlight for Windows Phone Or(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a bitwise OR operation.
Public methodStatic member OrAssign(Expression, Expression) Creates a BinaryExpression that represents a bitwise OR assignment operation.
Public methodStatic member OrAssign(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a bitwise OR assignment operation.
Public methodStatic member OrAssign(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents a bitwise OR assignment operation.
Public methodStatic memberSupported by Silverlight for Windows Phone OrElse(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 memberSupported by Silverlight for Windows Phone OrElse(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 member Parameter(Type) Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.
Public methodStatic memberSupported by Silverlight for Windows Phone Parameter(Type, String) Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.
Public methodStatic member PostDecrementAssign(Expression) Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent decrement by 1 of the original expression.
Public methodStatic member PostDecrementAssign(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 member PostIncrementAssign(Expression) Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent increment by 1 of the original expression.
Public methodStatic member PostIncrementAssign(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 memberSupported by Silverlight for Windows Phone Power(Expression, Expression) Creates a BinaryExpression that represents raising a number to a power.
Public methodStatic memberSupported by Silverlight for Windows Phone Power(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents raising a number to a power.
Public methodStatic member PowerAssign(Expression, Expression) Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.
Public methodStatic member PowerAssign(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.
Public methodStatic member PowerAssign(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 member PreDecrementAssign(Expression) Creates a UnaryExpression that decrements the expression by 1 and assigns the result back to the expression.
Public methodStatic member PreDecrementAssign(Expression, MethodInfo) Creates a UnaryExpression that decrements the expression by 1 and assigns the result back to the expression.
Public methodStatic member PreIncrementAssign(Expression) Creates a UnaryExpression that increments the expression by 1 and assigns the result back to the expression.
Public methodStatic member PreIncrementAssign(Expression, MethodInfo) Creates a UnaryExpression that increments the expression by 1 and assigns the result back to the expression.
Public methodStatic memberSupported by Silverlight for Windows Phone Property(Expression, MethodInfo) Creates a MemberExpression that represents accessing a property by using a property accessor method.
Public methodStatic memberSupported by Silverlight for Windows Phone Property(Expression, PropertyInfo) Creates a MemberExpression that represents accessing a property.
Public methodStatic memberSupported by Silverlight for Windows Phone Property(Expression, String) Creates a MemberExpression that represents accessing a property.
Public methodStatic member Property(Expression, PropertyInfo, IEnumerable<Expression>) Creates an IndexExpression representing the access to an indexed property.
Public methodStatic member Property(Expression, PropertyInfo, array<Expression[]) Creates an IndexExpression representing the access to an indexed property.
Public methodStatic member Property(Expression, String, array<Expression[]) Creates an IndexExpression representing the access to an indexed property.
Public methodStatic member Property(Expression, Type, String) Creates a MemberExpression accessing a property.
Public methodStatic memberSupported by Silverlight for Windows Phone PropertyOrField Creates a MemberExpression that represents accessing a property or field.
Public methodStatic memberSupported by Silverlight for Windows Phone Quote Creates a UnaryExpression that represents an expression that has a constant value of type Expression.
Public method Reduce Reduces 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 method ReduceAndCheck Reduces 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 method ReduceExtensions Reduces 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 member ReferenceEqual Creates a BinaryExpression that represents a reference equality comparison.
Public methodStatic member ReferenceNotEqual Creates a BinaryExpression that represents a reference inequality comparison.
Public methodStatic member Rethrow() Creates a UnaryExpression that represents a rethrowing of an exception.
Public methodStatic member Rethrow(Type) Creates a UnaryExpression that represents a rethrowing of an exception with a given type.
Public methodStatic member Return(LabelTarget) Creates a GotoExpression representing a return statement.
Public methodStatic member Return(LabelTarget, Expression) Creates a GotoExpression representing a return statement. The value passed to the label upon jumping can be specified.
Public methodStatic member Return(LabelTarget, Type) Creates a GotoExpression representing a return statement with the specified type.
Public methodStatic member Return(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 memberSupported by Silverlight for Windows Phone RightShift(Expression, Expression) Creates a BinaryExpression that represents a bitwise right-shift operation.
Public methodStatic memberSupported by Silverlight for Windows Phone RightShift(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a bitwise right-shift operation.
Public methodStatic member RightShiftAssign(Expression, Expression) Creates a BinaryExpression that represents a bitwise right-shift assignment operation.
Public methodStatic member RightShiftAssign(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a bitwise right-shift assignment operation.
Public methodStatic member RightShiftAssign(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents a bitwise right-shift assignment operation.
Public methodStatic member RuntimeVariables(IEnumerable<ParameterExpression>) Creates an instance of RuntimeVariablesExpression.
Public methodStatic member RuntimeVariables(array<ParameterExpression[]) Creates an instance of RuntimeVariablesExpression.
Public methodStatic memberSupported by Silverlight for Windows Phone Subtract(Expression, Expression) Creates a BinaryExpression that represents an arithmetic subtraction operation that does not have overflow checking.
Public methodStatic memberSupported by Silverlight for Windows Phone Subtract(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents an arithmetic subtraction operation that does not have overflow checking.
Public methodStatic member SubtractAssign(Expression, Expression) Creates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.
Public methodStatic member SubtractAssign(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.
Public methodStatic member SubtractAssign(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.
Public methodStatic member SubtractAssignChecked(Expression, Expression) Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.
Public methodStatic member SubtractAssignChecked(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.
Public methodStatic member SubtractAssignChecked(Expression, Expression, MethodInfo, LambdaExpression) Creates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.
Public methodStatic memberSupported by Silverlight for Windows Phone SubtractChecked(Expression, Expression) Creates a BinaryExpression that represents an arithmetic subtraction operation that has overflow checking.
Public methodStatic memberSupported by Silverlight for Windows Phone SubtractChecked(Expression, Expression, MethodInfo) Creates a BinaryExpression that represents an arithmetic subtraction operation that has overflow checking.
Public methodStatic member Switch(Expression, array<SwitchCase[]) Creates a SwitchExpression that represents a switch statement without a default case.
Public methodStatic member Switch(Expression, Expression, array<SwitchCase[]) Creates a SwitchExpression that represents a switch statement that has a default case.
Public methodStatic member Switch(Expression, Expression, MethodInfo, IEnumerable<SwitchCase>) Creates a SwitchExpression that represents a switch statement that has a default case.
Public methodStatic member Switch(Expression, Expression, MethodInfo, array<SwitchCase[]) Creates a SwitchExpression that represents a switch statement that has a default case.
Public methodStatic member Switch(Type, Expression, Expression, MethodInfo, IEnumerable<SwitchCase>) Creates a SwitchExpression that represents a switch statement that has a default case.
Public methodStatic member Switch(Type, Expression, Expression, MethodInfo, array<SwitchCase[]) Creates a SwitchExpression that represents a switch statement that has a default case..
Public methodStatic member SwitchCase(Expression, IEnumerable<Expression>) Creates a SwitchCase object to be used in a SwitchExpression object.
Public methodStatic member SwitchCase(Expression, array<Expression[]) Creates a SwitchCase for use in a SwitchExpression.
Public methodStatic member SymbolDocument(String) Creates an instance of SymbolDocumentInfo.
Public methodStatic member SymbolDocument(String, Guid) Creates an instance of SymbolDocumentInfo.
Public methodStatic member SymbolDocument(String, Guid, Guid) Creates an instance of SymbolDocumentInfo.
Public methodStatic member SymbolDocument(String, Guid, Guid, Guid) Creates an instance of SymbolDocumentInfo.
Public methodStatic member Throw(Expression) Creates a UnaryExpression that represents a throwing of an exception.
Public methodStatic member Throw(Expression, Type) Creates a UnaryExpression that represents a throwing of an exception with a given type.
Public methodSupported by Silverlight for Windows Phone ToString Returns a textual representation of the Expression. (Overrides Object.ToString().)
Public methodStatic member TryCatch Creates a TryExpression representing a try block with any number of catch statements and neither a fault nor finally block.
Public methodStatic member TryCatchFinally Creates a TryExpression representing a try block with any number of catch statements and a finally block.
Public methodStatic member TryFault Creates a TryExpression representing a try block with a fault block and no catch statements.
Public methodStatic member TryFinally Creates a TryExpression representing a try block with a finally block and no catch statements.
Public methodStatic member TryGetActionType Creates a Type object that represents a generic System.Action delegate type that has specific type arguments.
Public methodStatic member TryGetFuncType Creates 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 memberSupported by Silverlight for Windows Phone TypeAs Creates a UnaryExpression that represents an explicit reference or boxing conversion where nulla null reference (Nothing in Visual Basic) is supplied if the conversion fails.
Public methodStatic member TypeEqual Creates a TypeBinaryExpression that compares run-time type identity.
Public methodStatic memberSupported by Silverlight for Windows Phone TypeIs Creates a TypeBinaryExpression.
Public methodStatic memberSupported by Silverlight for Windows Phone UnaryPlus(Expression) Creates a UnaryExpression that represents a unary plus operation.
Public methodStatic memberSupported by Silverlight for Windows Phone UnaryPlus(Expression, MethodInfo) Creates a UnaryExpression that represents a unary plus operation.
Public methodStatic member Unbox Creates a UnaryExpression that represents an explicit unboxing.
Public methodStatic member Variable(Type) Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.
Public methodStatic member Variable(Type, String) Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.
Protected method VisitChildren Reduces the node and then calls the visitor delegate on the reduced expression. The method throws an exception if the node is not reducible.

Top

Examples

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

' Add the following directive to your file:
' Imports System.Linq.Expressions

' The block expression enables you to execute several expressions sequentually.
' When the block expression is executed,
' it returns the value of the last expression in the sequence.
Dim blockExpr As BlockExpression = Expression.Block(
    Expression.Call(
        Nothing,
        GetType(Console).GetMethod("Write", New Type() {GetType(String)}),
        Expression.Constant("Hello ")
       ),
    Expression.Call(
        Nothing,
        GetType(Console).GetMethod("WriteLine", New Type() {GetType(String)}),
        Expression.Constant("World!")
        ),
    Expression.Constant(42)
)

outputBlock.Text &= "The result of executing the expression tree:" & vbCrLf
' The following statement first creates an expression tree,
' then compiles it, and then executes it.           
Dim result = Expression.Lambda(Of Func(Of Integer))(blockExpr).Compile()()

' Print the expressions from the block expression.
outputBlock.Text &= "The expressions from the block expression:" & vbCrLf
For Each expr In blockExpr.Expressions
    outputBlock.Text &= expr.ToString() & vbCrLf
Next

' Print the result of the tree execution.
outputBlock.Text &= "The return value of the block expression:" & vbCrLf
outputBlock.Text &= result & vbCrLf

' This code example produces the following output:
'
' The result of executing the expression tree:
' Hello World!

' The expressions from the block expression:
' Write("Hello ")
' WriteLine("World!")
' 42

' The return value of the block expression:
' 42
// Add the following directive to your file:
// using System.Linq.Expressions;  

// The block expression allows for executing several expressions sequentually.
// When the block expression is executed,
// it returns the value of the last expression in the sequence.
BlockExpression blockExpr = Expression.Block(
    Expression.Call(
        null,
        typeof(Console).GetMethod("Write", new Type[] { typeof(String) }),
        Expression.Constant("Hello ")
       ),
    Expression.Call(
        null,
        typeof(Console).GetMethod("WriteLine", new Type[] { typeof(String) }),
        Expression.Constant("World!")
        ),
    Expression.Constant(42)
);

outputBlock.Text += "The result of executing the expression tree:" + "\n";
// The following statement first creates an expression tree,
// then compiles it, and then executes it.           
var result = Expression.Lambda<Func<int>>(blockExpr).Compile()();

// Print out the expressions from the block expression.
outputBlock.Text += "The expressions from the block expression:" + "\n";
foreach (var expr in blockExpr.Expressions)
   outputBlock.Text += expr.ToString() + "\n";

// Print out the result of the tree execution.
outputBlock.Text += "The return value of the block expression:" + "\n";
outputBlock.Text += result + "\n";

// This code example produces the following output:
//
// The result of executing the expression tree:
// Hello World!

// The expressions from the block expression:
// Write("Hello ")
// WriteLine("World!")
// 42

// The return value of the block expression:
// 42

Version Information

Silverlight

Supported in: 5, 4, 3

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1, Windows Phone OS 7.0

XNA Framework

Supported in: Windows Phone OS 7.0

Platforms

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Thread Safety

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

Inheritance Hierarchy

System.Object
  System.Linq.Expressions.Expression
    System.Linq.Expressions.BinaryExpression
    System.Linq.Expressions.BlockExpression
    System.Linq.Expressions.ConditionalExpression
    System.Linq.Expressions.ConstantExpression
    System.Linq.Expressions.DebugInfoExpression
    System.Linq.Expressions.DefaultExpression
    System.Linq.Expressions.DynamicExpression
    System.Linq.Expressions.GotoExpression
    System.Linq.Expressions.IndexExpression
    System.Linq.Expressions.InvocationExpression
    System.Linq.Expressions.LabelExpression
    System.Linq.Expressions.LambdaExpression
    System.Linq.Expressions.ListInitExpression
    System.Linq.Expressions.LoopExpression
    System.Linq.Expressions.MemberExpression
    System.Linq.Expressions.MemberInitExpression
    System.Linq.Expressions.MethodCallExpression
    System.Linq.Expressions.NewArrayExpression
    System.Linq.Expressions.NewExpression
    System.Linq.Expressions.ParameterExpression
    System.Linq.Expressions.RuntimeVariablesExpression
    System.Linq.Expressions.SwitchExpression
    System.Linq.Expressions.TryExpression
    System.Linq.Expressions.TypeBinaryExpression
    System.Linq.Expressions.UnaryExpression