Export (0) Print
Expand All

ExpressionType Enumeration

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

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

public enum ExpressionType

Member nameDescription
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAddAn addition operation, such as a + b, without overflow checking, for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAddAssignAn addition compound assignment operation, such as (a += b), without overflow checking, for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAddAssignCheckedAn addition compound assignment operation, such as (a += b), with overflow checking, for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAddCheckedAn addition operation, such as (a + b), with overflow checking, for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAndA bitwise or logical AND operation, such as (a & b) in C# and (a And b) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAndAlsoA 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 Portable Class LibrarySupported in .NET for Windows Store appsAndAssignA bitwise or logical AND compound assignment operation, such as (a &= b) in C#.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsArrayIndexAn indexing operation in a one-dimensional array, such as array[index] in C# or array(index) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsArrayLengthAn operation that obtains the length of a one-dimensional array, such as array.Length.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsAssignAn assignment operation, such as (a = b).
Supported by Portable Class LibrarySupported in .NET for Windows Store appsBlockA block of expressions.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsCallA method call, such as in the obj.sampleMethod() expression.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsCoalesceA node that represents a null coalescing operation, such as (a ?? b) in C# or If(a, b) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsConditionalA conditional operation, such as a > b ? a : b in C# or If(a > b, a, b) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsConstantA constant value.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsConvertA 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 Portable Class LibrarySupported in .NET for Windows Store appsConvertCheckedA 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 Portable Class LibrarySupported in .NET for Windows Store appsDebugInfoDebugging information.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsDecrementA unary decrement operation, such as (a - 1) in C# and Visual Basic. The object a should not be modified in place.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsDefaultA default value.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsDivideA division operation, such as (a / b), for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsDivideAssignAn division compound assignment operation, such as (a /= b), for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsDynamicA dynamic operation.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsEqualA node that represents an equality comparison, such as (a == b) in C# or (a = b) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsExclusiveOrA bitwise or logical XOR operation, such as (a ^ b) in C# or (a Xor b) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsExclusiveOrAssignA bitwise or logical XOR compound assignment operation, such as (a ^= b) in C#.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsExtensionAn extension expression.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsGotoA "go to" expression, such as goto Label in C# or GoTo Label in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsGreaterThanA "greater than" comparison, such as (a > b).
Supported by Portable Class LibrarySupported in .NET for Windows Store appsGreaterThanOrEqualA "greater than or equal to" comparison, such as (a >= b).
Supported by Portable Class LibrarySupported in .NET for Windows Store appsIncrementA unary increment operation, such as (a + 1) in C# and Visual Basic. The object a should not be modified in place.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsIndexAn index operation or an operation that accesses a property that takes arguments.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsInvokeAn operation that invokes a delegate or lambda expression, such as sampleDelegate.Invoke().
Supported by Portable Class LibrarySupported in .NET for Windows Store appsIsFalseA false condition value.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsIsTrueA true condition value.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsLabelA label.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsLambdaA lambda expression, such as a => a + a in C# or Function(a) a + a in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsLeftShiftA bitwise left-shift operation, such as (a << b).
Supported by Portable Class LibrarySupported in .NET for Windows Store appsLeftShiftAssignA bitwise left-shift compound assignment, such as (a <<= b).
Supported by Portable Class LibrarySupported in .NET for Windows Store appsLessThanA "less than" comparison, such as (a < b).
Supported by Portable Class LibrarySupported in .NET for Windows Store appsLessThanOrEqualA "less than or equal to" comparison, such as (a <= b).
Supported by Portable Class LibrarySupported in .NET for Windows Store appsListInitAn 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 Portable Class LibrarySupported in .NET for Windows Store appsLoopA loop, such as for or while.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsMemberAccessAn operation that reads from a field or property, such as obj.SampleProperty.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsMemberInitAn 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 Portable Class LibrarySupported in .NET for Windows Store appsModuloAn arithmetic remainder operation, such as (a % b) in C# or (a Mod b) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsModuloAssignAn arithmetic remainder compound assignment operation, such as (a %= b) in C#.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsMultiplyA multiplication operation, such as (a * b), without overflow checking, for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsMultiplyAssignA multiplication compound assignment operation, such as (a *= b), without overflow checking, for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsMultiplyAssignCheckedA multiplication compound assignment operation, such as (a *= b), that has overflow checking, for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsMultiplyCheckedAn multiplication operation, such as (a * b), that has overflow checking, for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsNegateAn arithmetic negation operation, such as (-a). The object a should not be modified in place.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsNegateCheckedAn arithmetic negation operation, such as (-a), that has overflow checking. The object a should not be modified in place.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsNewAn operation that calls a constructor to create a new object, such as new SampleType().
Supported by Portable Class LibrarySupported in .NET for Windows Store appsNewArrayBoundsAn 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 Portable Class LibrarySupported in .NET for Windows Store appsNewArrayInitAn 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 Portable Class LibrarySupported in .NET for Windows Store appsNotA 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 Portable Class LibrarySupported in .NET for Windows Store appsNotEqualAn inequality comparison, such as (a != b) in C# or (a <> b) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsOnesComplementA ones complement operation, such as (~a) in C#.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsOrA bitwise or logical OR operation, such as (a | b) in C# or (a Or b) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsOrAssignA bitwise or logical OR compound assignment, such as (a |= b) in C#.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsOrElseA short-circuiting conditional OR operation, such as (a || b) in C# or (a OrElse b) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsParameterA reference to a parameter or variable that is defined in the context of the expression. For more information, see ParameterExpression.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsPostDecrementAssignA unary postfix decrement, such as (a--). The object a should be modified in place.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsPostIncrementAssignA unary postfix increment, such as (a++). The object a should be modified in place.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsPowerA mathematical operation that raises a number to a power, such as (a ^ b) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsPowerAssignA compound assignment operation that raises a number to a power, such as (a ^= b) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsPreDecrementAssignA unary prefix decrement, such as (--a). The object a should be modified in place.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsPreIncrementAssignA unary prefix increment, such as (++a). The object a should be modified in place.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsQuoteAn 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 Portable Class LibrarySupported in .NET for Windows Store appsRightShiftA bitwise right-shift operation, such as (a >> b).
Supported by Portable Class LibrarySupported in .NET for Windows Store appsRightShiftAssignA bitwise right-shift compound assignment operation, such as (a >>= b).
Supported by Portable Class LibrarySupported in .NET for Windows Store appsRuntimeVariablesA list of run-time variables. For more information, see RuntimeVariablesExpression.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsSubtractA subtraction operation, such as (a - b), without overflow checking, for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsSubtractAssignA subtraction compound assignment operation, such as (a -= b), without overflow checking, for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsSubtractAssignCheckedA subtraction compound assignment operation, such as (a -= b), that has overflow checking, for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsSubtractCheckedAn arithmetic subtraction operation, such as (a - b), that has overflow checking, for numeric operands.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsSwitchA switch operation, such as switch in C# or Select Case in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsThrowAn operation that throws an exception, such as throw new Exception().
Supported by Portable Class LibrarySupported in .NET for Windows Store appsTryA try-catch expression.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsTypeAsAn explicit reference or boxing conversion in which null is supplied if the conversion fails, such as (obj as SampleType) in C# or TryCast(obj, SampleType) in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsTypeEqualAn exact type test.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsTypeIsA type test, such as obj is SampleType in C# or TypeOf obj is SampleType in Visual Basic.
Supported by Portable Class LibrarySupported in .NET for Windows Store appsUnaryPlusA 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 Portable Class LibrarySupported in .NET for Windows Store appsUnboxAn unbox value type operation, such as unbox and unbox.any instructions in MSIL.

For more information about each enumeration value of this type, see section 4.4 of expr-tree-spec.doc or expr-tree-spec.pdf on the Microsoft Dynamic Language Runtime page of the Codeplex website.

.NET Framework

Supported in: 4.5, 4, 3.5

.NET Framework Client Profile

Supported in: 4, 3.5 SP1

Portable Class Library

Supported in: Portable Class Library

.NET for Windows Store apps

Supported in: Windows 8

.NET for Windows Phone apps

Supported in: Windows Phone 8.1, Windows Phone Silverlight 8.1, Windows Phone Silverlight 8

Windows Phone 8.1, Windows Phone 8, Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Show:
© 2014 Microsoft