Edit

Share via


ExpressionType Enum

Definition

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

public enum class ExpressionType
public enum ExpressionType
type ExpressionType = 
Public Enum ExpressionType
Inheritance
ExpressionType

Fields

Add 0

An addition operation, such as a + b, without overflow checking, for numeric operands.

AddAssign 63

An addition compound assignment operation, such as (a += b), without overflow checking, for numeric operands.

AddAssignChecked 74

An addition compound assignment operation, such as (a += b), with overflow checking, for numeric operands.

AddChecked 1

An addition operation, such as (a + b), with overflow checking, for numeric operands.

And 2

A bitwise or logical AND operation, such as (a & b) in C# and (a And b) in Visual Basic.

AndAlso 3

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.

AndAssign 64

A bitwise or logical AND compound assignment operation, such as (a &= b) in C#.

ArrayIndex 5

An indexing operation in a one-dimensional array, such as array[index] in C# or array(index) in Visual Basic.

ArrayLength 4

An operation that obtains the length of a one-dimensional array, such as array.Length.

Assign 46

An assignment operation, such as (a = b).

Block 47

A block of expressions.

Call 6

A method call, such as in the obj.sampleMethod() expression.

Coalesce 7

A node that represents a null coalescing operation, such as (a ?? b) in C# or If(a, b) in Visual Basic.

Conditional 8

A conditional operation, such as a > b ? a : b in C# or If(a > b, a, b) in Visual Basic.

Constant 9

A constant value.

Convert 10

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.

ConvertChecked 11

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.

DebugInfo 48

Debugging information.

Decrement 49

A unary decrement operation, such as (a - 1) in C# and Visual Basic. The object a should not be modified in place.

Default 51

A default value.

Divide 12

A division operation, such as (a / b), for numeric operands.

DivideAssign 65

An division compound assignment operation, such as (a /= b), for numeric operands.

Dynamic 50

A dynamic operation.

Equal 13

A node that represents an equality comparison, such as (a == b) in C# or (a = b) in Visual Basic.

ExclusiveOr 14

A bitwise or logical XOR operation, such as (a ^ b) in C# or (a Xor b) in Visual Basic.

ExclusiveOrAssign 66

A bitwise or logical XOR compound assignment operation, such as (a ^= b) in C#.

Extension 52

An extension expression.

Goto 53

A "go to" expression, such as goto Label in C# or GoTo Label in Visual Basic.

GreaterThan 15

A "greater than" comparison, such as (a > b).

GreaterThanOrEqual 16

A "greater than or equal to" comparison, such as (a >= b).

Increment 54

A unary increment operation, such as (a + 1) in C# and Visual Basic. The object a should not be modified in place.

Index 55

An index operation or an operation that accesses a property that takes arguments.

Invoke 17

An operation that invokes a delegate or lambda expression, such as sampleDelegate.Invoke().

IsFalse 84

A false condition value.

IsTrue 83

A true condition value.

Label 56

A label.

Lambda 18

A lambda expression, such as a => a + a in C# or Function(a) a + a in Visual Basic.

LeftShift 19

A bitwise left-shift operation, such as (a << b).

LeftShiftAssign 67

A bitwise left-shift compound assignment, such as (a <<= b).

LessThan 20

A "less than" comparison, such as (a < b).

LessThanOrEqual 21

A "less than or equal to" comparison, such as (a <= b).

ListInit 22

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.

Loop 58

A loop, such as for or while.

MemberAccess 23

An operation that reads from a field or property, such as obj.SampleProperty.

MemberInit 24

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.

Modulo 25

An arithmetic remainder operation, such as (a % b) in C# or (a Mod b) in Visual Basic.

ModuloAssign 68

An arithmetic remainder compound assignment operation, such as (a %= b) in C#.

Multiply 26

A multiplication operation, such as (a * b), without overflow checking, for numeric operands.

MultiplyAssign 69

A multiplication compound assignment operation, such as (a *= b), without overflow checking, for numeric operands.

MultiplyAssignChecked 75

A multiplication compound assignment operation, such as (a *= b), that has overflow checking, for numeric operands.

MultiplyChecked 27

An multiplication operation, such as (a * b), that has overflow checking, for numeric operands.

Negate 28

An arithmetic negation operation, such as (-a). The object a should not be modified in place.

NegateChecked 30

An arithmetic negation operation, such as (-a), that has overflow checking. The object a should not be modified in place.

New 31

An operation that calls a constructor to create a new object, such as new SampleType().

NewArrayBounds 33

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.

NewArrayInit 32

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.

Not 34

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.

NotEqual 35

An inequality comparison, such as (a != b) in C# or (a <> b) in Visual Basic.

OnesComplement 82

A ones complement operation, such as (~a) in C#.

Or 36

A bitwise or logical OR operation, such as (a | b) in C# or (a Or b) in Visual Basic.

OrAssign 70

A bitwise or logical OR compound assignment, such as (a |= b) in C#.

OrElse 37

A short-circuiting conditional OR operation, such as (a || b) in C# or (a OrElse b) in Visual Basic.

Parameter 38

A reference to a parameter or variable that is defined in the context of the expression. For more information, see ParameterExpression.

PostDecrementAssign 80

A unary postfix decrement, such as (a--). The object a should be modified in place.

PostIncrementAssign 79

A unary postfix increment, such as (a++). The object a should be modified in place.

Power 39

A mathematical operation that raises a number to a power, such as (a ^ b) in Visual Basic.

PowerAssign 71

A compound assignment operation that raises a number to a power, such as (a ^= b) in Visual Basic.

PreDecrementAssign 78

A unary prefix decrement, such as (--a). The object a should be modified in place.

PreIncrementAssign 77

A unary prefix increment, such as (++a). The object a should be modified in place.

Quote 40

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.

RightShift 41

A bitwise right-shift operation, such as (a >> b).

RightShiftAssign 72

A bitwise right-shift compound assignment operation, such as (a >>= b).

RuntimeVariables 57

A list of run-time variables. For more information, see RuntimeVariablesExpression.

Subtract 42

A subtraction operation, such as (a - b), without overflow checking, for numeric operands.

SubtractAssign 73

A subtraction compound assignment operation, such as (a -= b), without overflow checking, for numeric operands.

SubtractAssignChecked 76

A subtraction compound assignment operation, such as (a -= b), that has overflow checking, for numeric operands.

SubtractChecked 43

An arithmetic subtraction operation, such as (a - b), that has overflow checking, for numeric operands.

Switch 59

A switch operation, such as switch in C# or Select Case in Visual Basic.

Throw 60

An operation that throws an exception, such as throw new Exception().

Try 61

A try-catch expression.

TypeAs 44

An 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.

TypeEqual 81

An exact type test.

TypeIs 45

A type test, such as obj is SampleType in C# or TypeOf obj is SampleType in Visual Basic.

UnaryPlus 29

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.

Unbox 62

An unbox value type operation, such as unbox and unbox.any instructions in MSIL.

Remarks

For more information about each enumeration value of this type, see Dynamic Language Runtime Overview.

Applies to