ExpressionType Enumeration

Describes the node types for the nodes of an expression tree.

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

Syntax

'Declaration
Public Enumeration ExpressionType
public enum ExpressionType

Members

Member name Description
Supported by Silverlight for Windows Phone Add An addition operation, such as a + b, without overflow checking, for numeric operands.
Supported by Silverlight for Windows Phone AddChecked An addition operation, such as (a + b), with overflow checking, for numeric operands.
Supported by Silverlight for Windows Phone And A bitwise or logical AND operation, such as (a & b) in C# and (a And b) in Visual Basic.
Supported by Silverlight for Windows Phone AndAlso A conditional AND operation that evaluates the second operand only if the first operand evaluates to true. It corresponds to (a && b) in C# and (a AndAlso b) in Visual Basic.
Supported by Silverlight for Windows Phone ArrayLength An operation that obtains the length of a one-dimensional array, such as array.Length.
Supported by Silverlight for Windows Phone ArrayIndex An indexing operation in a one-dimensional array, such as array[index] in C# or array(index) in Visual Basic.
Supported by Silverlight for Windows Phone Call A method call, such as in the obj.sampleMethod() expression.
Supported by Silverlight for Windows Phone Coalesce A node that represents a null coalescing operation, such as (a ?? b) in C# or If(a, b) in Visual Basic.
Supported by Silverlight for Windows Phone Conditional A conditional operation, such as a > b ? a : b in C# or If(a > b, a, b) in Visual Basic.
Supported by Silverlight for Windows Phone Constant A constant value.
Supported by Silverlight for Windows Phone Convert A cast or conversion operation, such as (SampleType)obj in C#or CType(obj, SampleType) in Visual Basic. For a numeric conversion, if the converted value is too large for the destination type, no exception is thrown.
Supported by Silverlight for Windows Phone ConvertChecked A cast or conversion operation, such as (SampleType)obj in C#or CType(obj, SampleType) in Visual Basic. For a numeric conversion, if the converted value does not fit the destination type, an exception is thrown.
Supported by Silverlight for Windows Phone Divide A division operation, such as (a / b), for numeric operands.
Supported by Silverlight for Windows Phone Equal A node that represents an equality comparison, such as (a == b) in C# or (a = b) in Visual Basic.
Supported by Silverlight for Windows Phone ExclusiveOr A bitwise or logical XOR operation, such as (a ^ b) in C# or (a Xor b) in Visual Basic.
Supported by Silverlight for Windows Phone GreaterThan A "greater than" comparison, such as (a > b).
Supported by Silverlight for Windows Phone GreaterThanOrEqual A "greater than or equal to" comparison, such as (a >= b).
Supported by Silverlight for Windows Phone Invoke An operation that invokes a delegate or lambda expression, such as sampleDelegate.Invoke().
Supported by Silverlight for Windows Phone Lambda A lambda expression, such as a => a + a in C# or Function(a) a + a in Visual Basic.
Supported by Silverlight for Windows Phone LeftShift A bitwise left-shift operation, such as (a << b).
Supported by Silverlight for Windows Phone LessThan A "less than" comparison, such as (a < b).
Supported by Silverlight for Windows Phone LessThanOrEqual A "less than or equal to" comparison, such as (a <= b).
Supported by Silverlight for Windows Phone ListInit An operation that creates a new IEnumerable object and initializes it from a list of elements, such as new List<SampleType>(){ a, b, c } in C# or Dim sampleList = { a, b, c } in Visual Basic.
Supported by Silverlight for Windows Phone MemberAccess An operation that reads from a field or property, such as obj.SampleProperty.
Supported by Silverlight for Windows Phone MemberInit An operation that creates a new object and initializes one or more of its members, such as new Point { X = 1, Y = 2 } in C# or New Point With {.X = 1, .Y = 2} in Visual Basic.
Supported by Silverlight for Windows Phone Modulo An arithmetic remainder operation, such as (a % b) in C# or (a Mod b) in Visual Basic.
Supported by Silverlight for Windows Phone Multiply A multiplication operation, such as (a * b), without overflow checking, for numeric operands.
Supported by Silverlight for Windows Phone MultiplyChecked An multiplication operation, such as (a * b), that has overflow checking, for numeric operands.
Supported by Silverlight for Windows Phone Negate An arithmetic negation operation, such as (-a). The object a should not be modified in place.
Supported by Silverlight for Windows Phone UnaryPlus A unary plus operation, such as (+a). The result of a predefined unary plus operation is the value of the operand, but user-defined implementations might have unusual results.
Supported by Silverlight for Windows Phone NegateChecked An arithmetic negation operation, such as (-a), that has overflow checking. The object a should not be modified in place.
Supported by Silverlight for Windows Phone New An operation that calls a constructor to create a new object, such as new SampleType().
Supported by Silverlight for Windows Phone NewArrayInit An operation that creates a new one-dimensional array and initializes it from a list of elements, such as new SampleType[]{a, b, c} in C# or New SampleType(){a, b, c} in Visual Basic.
Supported by Silverlight for Windows Phone NewArrayBounds An operation that creates a new array, in which the bounds for each dimension are specified, such as new SampleType[dim1, dim2] in C# or New SampleType(dim1, dim2) in Visual Basic.
Supported by Silverlight for Windows Phone Not A bitwise complement or logical negation operation. In C#, it is equivalent to (~a) for integral types and to (!a) for Boolean values. In Visual Basic, it is equivalent to (Not a). The object a should not be modified in place.
Supported by Silverlight for Windows Phone NotEqual An inequality comparison, such as (a != b) in C# or (a <> b) in Visual Basic.
Supported by Silverlight for Windows Phone Or A bitwise or logical OR operation, such as (a | b) in C# or (a Or b) in Visual Basic.
Supported by Silverlight for Windows Phone OrElse A short-circuiting conditional OR operation, such as (a || b) in C# or (a OrElse b) in Visual Basic.
Supported by Silverlight for Windows Phone Parameter A reference to a parameter or variable that is defined in the context of the expression. For more information, see ParameterExpression.
Supported by Silverlight for Windows Phone Power A mathematical operation that raises a number to a power, such as (a ^ b) in Visual Basic.
Supported by Silverlight for Windows Phone Quote An expression that has a constant value of type Expression. A Quote node can contain references to parameters that are defined in the context of the expression it represents.
Supported by Silverlight for Windows Phone RightShift A bitwise right-shift operation, such as (a >> b).
Supported by Silverlight for Windows Phone Subtract A subtraction operation, such as (a - b), without overflow checking, for numeric operands.
Supported by Silverlight for Windows Phone SubtractChecked An arithmetic subtraction operation, such as (a - b), that has overflow checking, for numeric operands.
Supported by Silverlight for Windows Phone TypeAs An explicit reference or boxing conversion in which nulla null reference (Nothing in Visual Basic) is supplied if the conversion fails, such as (obj as SampleType) in C# or TryCast(obj, SampleType) in Visual Basic.
Supported by Silverlight for Windows Phone TypeIs A type test, such as obj is SampleType in C# or TypeOf obj is SampleType in Visual Basic.
Assign An assignment operation, such as (a = b).
Block A block of expressions.
DebugInfo Debugging information.
Decrement A unary decrement operation, such as (a - 1) in C# and Visual Basic. The object a should not be modified in place.
Dynamic A dynamic operation.
Default A default value.
Extension An extension expression.
Goto A "go to" expression, such as goto Label in C# or GoTo Label in Visual Basic.
Increment A unary increment operation, such as (a + 1) in C# and Visual Basic. The object a should not be modified in place.
Index An index operation or an operation that accesses a property that takes arguments.
Label A label.
RuntimeVariables A list of run-time variables. For more information, see RuntimeVariablesExpression.
Loop A loop, such as for or while.
Switch A switch operation, such as switch in C# or Select Case in Visual Basic.
Throw An operation that throws an exception, such as throw new Exception().
Try A try-catch expression.
Unbox An unbox value type operation, such as unbox and unbox.any instructions in MSIL.
AddAssign An addition compound assignment operation, such as (a += b), without overflow checking, for numeric operands.
AndAssign A bitwise or logical AND compound assignment operation, such as (a &= b) in C#.
DivideAssign An division compound assignment operation, such as (a /= b), for numeric operands.
ExclusiveOrAssign A bitwise or logical XOR compound assignment operation, such as (a ^= b) in C#.
LeftShiftAssign A bitwise left-shift compound assignment, such as (a <<= b).
ModuloAssign An arithmetic remainder compound assignment operation, such as (a %= b) in C#.
MultiplyAssign A multiplication compound assignment operation, such as (a *= b), without overflow checking, for numeric operands.
OrAssign A bitwise or logical OR compound assignment, such as (a |= b) in C#.
PowerAssign A compound assignment operation that raises a number to a power, such as (a ^= b) in Visual Basic.
RightShiftAssign A bitwise right-shift compound assignment operation, such as (a >>= b).
SubtractAssign A subtraction compound assignment operation, such as (a -= b), without overflow checking, for numeric operands.
AddAssignChecked An addition compound assignment operation, such as (a += b), with overflow checking, for numeric operands.
MultiplyAssignChecked A multiplication compound assignment operation, such as (a *= b), that has overflow checking, for numeric operands.
SubtractAssignChecked A subtraction compound assignment operation, such as (a -= b), that has overflow checking, for numeric operands.
PreIncrementAssign A unary prefix increment, such as (++a). The object a should be modified in place.
PreDecrementAssign A unary prefix decrement, such as (--a). The object a should be modified in place.
PostIncrementAssign A unary postfix increment, such as (a++). The object a should be modified in place.
PostDecrementAssign A unary postfix decrement, such as (a--). The object a should be modified in place.
TypeEqual An exact type test.
OnesComplement A ones complement operation, such as (~a) in C#.
IsTrue A true condition value.
IsFalse A false condition value.

Remarks

For more information about each enumeration value of this type, see the documentation on the CodePlex Web site.

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.