ExpressionType Enumeration

ExpressionType Enumeration

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

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

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

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

Member nameDescription
AddAn addition operation, such as a + b, without overflow checking, for numeric operands.
AddAssignAn addition compound assignment operation, such as (a += b), without overflow checking, for numeric operands.
AddAssignCheckedAn addition compound assignment operation, such as (a += b), with overflow checking, for numeric operands.
AddCheckedAn addition operation, such as (a + b), with overflow checking, for numeric operands.
AndA bitwise or logical AND operation, such as (a & b) in C# and (a And b) in Visual Basic.
AndAlsoA 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.
AndAssignA bitwise or logical AND compound assignment operation, such as (a &= b) in C#.
ArrayIndexAn indexing operation in a one-dimensional array, such as array[index] in C# or array(index) in Visual Basic.
ArrayLengthAn operation that obtains the length of a one-dimensional array, such as array.Length.
AssignAn assignment operation, such as (a = b).
BlockA block of expressions.
CallA method call, such as in the obj.sampleMethod() expression.
CoalesceA node that represents a null coalescing operation, such as (a ?? b) in C# or If(a, b) in Visual Basic.
ConditionalA conditional operation, such as a > b ? a : b in C# or If(a > b, a, b) in Visual Basic.
ConstantA constant value.
ConvertA 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.
ConvertCheckedA 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.
DebugInfoDebugging information.
DecrementA unary decrement operation, such as (a - 1) in C# and Visual Basic. The object a should not be modified in place.
DefaultA default value.
DivideA division operation, such as (a / b), for numeric operands.
DivideAssignAn division compound assignment operation, such as (a /= b), for numeric operands.
DynamicA dynamic operation.
EqualA node that represents an equality comparison, such as (a == b) in C# or (a = b) in Visual Basic.
ExclusiveOrA bitwise or logical XOR operation, such as (a ^ b) in C# or (a Xor b) in Visual Basic.
ExclusiveOrAssignA bitwise or logical XOR compound assignment operation, such as (a ^= b) in C#.
ExtensionAn extension expression.
GotoA "go to" expression, such as goto Label in C# or GoTo Label in Visual Basic.
GreaterThanA "greater than" comparison, such as (a > b).
GreaterThanOrEqualA "greater than or equal to" comparison, such as (a >= b).
IncrementA unary increment operation, such as (a + 1) in C# and Visual Basic. The object a should not be modified in place.
IndexAn index operation or an operation that accesses a property that takes arguments.
InvokeAn operation that invokes a delegate or lambda expression, such as sampleDelegate.Invoke().
IsFalseA false condition value.
IsTrueA true condition value.
LabelA label.
LambdaA lambda expression, such as a => a + a in C# or Function(a) a + a in Visual Basic.
LeftShiftA bitwise left-shift operation, such as (a << b).
LeftShiftAssignA bitwise left-shift compound assignment, such as (a <<= b).
LessThanA "less than" comparison, such as (a < b).
LessThanOrEqualA "less than or equal to" comparison, such as (a <= b).
ListInitAn 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.
LoopA loop, such as for or while.
MemberAccessAn operation that reads from a field or property, such as obj.SampleProperty.
MemberInitAn 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.
ModuloAn arithmetic remainder operation, such as (a % b) in C# or (a Mod b) in Visual Basic.
ModuloAssignAn arithmetic remainder compound assignment operation, such as (a %= b) in C#.
MultiplyA multiplication operation, such as (a * b), without overflow checking, for numeric operands.
MultiplyAssignA multiplication compound assignment operation, such as (a *= b), without overflow checking, for numeric operands.
MultiplyAssignCheckedA multiplication compound assignment operation, such as (a *= b), that has overflow checking, for numeric operands.
MultiplyCheckedAn multiplication operation, such as (a * b), that has overflow checking, for numeric operands.
NegateAn arithmetic negation operation, such as (-a). The object a should not be modified in place.
NegateCheckedAn arithmetic negation operation, such as (-a), that has overflow checking. The object a should not be modified in place.
NewAn operation that calls a constructor to create a new object, such as new SampleType().
NewArrayBoundsAn 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.
NewArrayInitAn 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.
NotA 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.
NotEqualAn inequality comparison, such as (a != b) in C# or (a <> b) in Visual Basic.
OnesComplementA ones complement operation, such as (~a) in C#.
OrA bitwise or logical OR operation, such as (a | b) in C# or (a Or b) in Visual Basic.
OrAssignA bitwise or logical OR compound assignment, such as (a |= b) in C#.
OrElseA short-circuiting conditional OR operation, such as (a || b) in C# or (a OrElse b) in Visual Basic.
ParameterA reference to a parameter or variable that is defined in the context of the expression. For more information, see ParameterExpression.
PostDecrementAssignA unary postfix decrement, such as (a--). The object a should be modified in place.
PostIncrementAssignA unary postfix increment, such as (a++). The object a should be modified in place.
PowerA mathematical operation that raises a number to a power, such as (a ^ b) in Visual Basic.
PowerAssignA compound assignment operation that raises a number to a power, such as (a ^= b) in Visual Basic.
PreDecrementAssignA unary prefix decrement, such as (--a). The object a should be modified in place.
PreIncrementAssignA unary prefix increment, such as (++a). The object a should be modified in place.
QuoteAn 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.
RightShiftA bitwise right-shift operation, such as (a >> b).
RightShiftAssignA bitwise right-shift compound assignment operation, such as (a >>= b).
RuntimeVariablesA list of run-time variables. For more information, see RuntimeVariablesExpression.
SubtractA subtraction operation, such as (a - b), without overflow checking, for numeric operands.
SubtractAssignA subtraction compound assignment operation, such as (a -= b), without overflow checking, for numeric operands.
SubtractAssignCheckedA subtraction compound assignment operation, such as (a -= b), that has overflow checking, for numeric operands.
SubtractCheckedAn arithmetic subtraction operation, such as (a - b), that has overflow checking, for numeric operands.
SwitchA switch operation, such as switch in C# or Select Case in Visual Basic.
ThrowAn operation that throws an exception, such as throw new Exception().
TryA try-catch expression.
TypeAsAn explicit reference or boxing conversion in which nullptr is supplied if the conversion fails, such as (obj as SampleType) in C# or TryCast(obj, SampleType) in Visual Basic.
TypeEqualAn exact type test.
TypeIsA type test, such as obj is SampleType in C# or TypeOf obj is SampleType in Visual Basic.
UnaryPlusA 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.
UnboxAn unbox value type operation, such as unbox and unbox.any instructions in MSIL.

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

Windows Phone OS

Supported in: 8.1, 8.0, 7.1, 7.0

Windows Phone

Show:
© 2017 Microsoft