ExpressionType 枚举

定义

描述表达式目录树的节点的节点类型。Describes the node types for the nodes of an expression tree.

public enum class ExpressionType
public enum ExpressionType
type ExpressionType = 
Public Enum ExpressionType
继承
ExpressionType

字段

Add 0

加法运算,如 a + b,针对数值操作数,不进行溢出检查。An addition operation, such as a + b, without overflow checking, for numeric operands.

AddAssign 63

加法复合赋值运算,如 (a += b),针对数值操作数,不进行溢出检查。An addition compound assignment operation, such as (a += b), without overflow checking, for numeric operands.

AddAssignChecked 74

加法复合赋值运算,如 (a += b),针对数值操作数,并进行溢出检查。An addition compound assignment operation, such as (a += b), with overflow checking, for numeric operands.

AddChecked 1

加法运算,如 (a + b),针对数值操作数,进行溢出检查。An addition operation, such as (a + b), with overflow checking, for numeric operands.

And 2

按位或逻辑 AND 运算,如 C# 中的 (a & b) 和 Visual Basic 中的 (a And b)A bitwise or logical AND operation, such as (a & b) in C# and (a And b) in Visual Basic.

AndAlso 3

条件 AND 运算,它仅在第一个操作数的计算结果为 true 时才计算第二个操作数。A conditional AND operation that evaluates the second operand only if the first operand evaluates to true. 它对应于 C# 中的 (a && b) 和 Visual Basic 中的 (a AndAlso b)It corresponds to (a && b) in C# and (a AndAlso b) in Visual Basic.

AndAssign 64

按位或逻辑 AND 复合赋值运算,如 C# 中的 (a &= b)A bitwise or logical AND compound assignment operation, such as (a &= b) in C#.

ArrayIndex 5

一维数组中的索引运算,如 C# 中的 array[index] 或 Visual Basic 中的 array(index)An indexing operation in a one-dimensional array, such as array[index] in C# or array(index) in Visual Basic.

ArrayLength 4

获取一维数组长长度的运算,如 array.LengthAn operation that obtains the length of a one-dimensional array, such as array.Length.

Assign 46

赋值运算,如 (a = b)An assignment operation, such as (a = b).

Block 47

表达式块。A block of expressions.

Call 6

方法调用,如在 obj.sampleMethod() 表达式中。A method call, such as in the obj.sampleMethod() expression.

Coalesce 7

表示 null 合并运算的节点,如 C# 中的 (a ?? b) 或 Visual Basic 中的 If(a, b)A node that represents a null coalescing operation, such as (a ?? b) in C# or If(a, b) in Visual Basic.

Conditional 8

条件运算,如 C# 中的 a > b ? a : b 或 Visual Basic 中的 If(a > b, a, b)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

强制转换或转换操作,如 C# 中的 (SampleType)obj 或 Visual Basic 中的 CType(obj, SampleType)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

强制转换或转换操作,如 C# 中的 (SampleType)obj 或 Visual Basic 中的 CType(obj, SampleType)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

一元递减运算,如 C# 和 Visual Basic 中的 (a - 1)A unary decrement operation, such as (a - 1) in C# and Visual Basic. 不应就地修改 a 对象。The object a should not be modified in place.

Default 51

默认值。A default value.

Divide 12

除法运算,如 (a / b),针对数值操作数。A division operation, such as (a / b), for numeric operands.

DivideAssign 65

除法复合赋值运算,如 (a /= b),针对数值操作数。An division compound assignment operation, such as (a /= b), for numeric operands.

Dynamic 50

动态操作。A dynamic operation.

Equal 13

表示相等比较的节点,如 C# 中的 (a == b) 或 Visual Basic 中的 (a = b)A node that represents an equality comparison, such as (a == b) in C# or (a = b) in Visual Basic.

ExclusiveOr 14

按位或逻辑 XOR 运算,如 C# 中的 (a ^ b) 和 Visual Basic 中的 (a Xor b)A bitwise or logical XOR operation, such as (a ^ b) in C# or (a Xor b) in Visual Basic.

ExclusiveOrAssign 66

按位或逻辑 XOR 复合赋值运算,如 C# 中的 (a ^= b)A bitwise or logical XOR compound assignment operation, such as (a ^= b) in C#.

Extension 52

扩展表达式。An extension expression.

Goto 53

“转到”表达式,如 C# 中的 goto Label 或 Visual Basic 中的 GoTo LabelA "go to" expression, such as goto Label in C# or GoTo Label in Visual Basic.

GreaterThan 15

“大于”比较,如 (a > b)A "greater than" comparison, such as (a > b).

GreaterThanOrEqual 16

“大于或等于”比较,如 (a >= b)A "greater than or equal to" comparison, such as (a >= b).

Increment 54

一元递增运算,如 C# 和 Visual Basic 中的 (a + 1)A unary increment operation, such as (a + 1) in C# and Visual Basic. 不应就地修改 a 对象。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

调用委托或 lambda 表达式的运算,如 sampleDelegate.Invoke()An operation that invokes a delegate or lambda expression, such as sampleDelegate.Invoke().

IsFalse 84

false 条件值。A false condition value.

IsTrue 83

true 条件值。A true condition value.

Label 56

标签。A label.

Lambda 18

lambda 表达式,如 C# 中的 a => a + a 或 Visual Basic 中的 Function(a) a + aA lambda expression, such as a => a + a in C# or Function(a) a + a in Visual Basic.

LeftShift 19

按位左移运算,如 (a << b)A bitwise left-shift operation, such as (a << b).

LeftShiftAssign 67

按位左移复合赋值运算,如 (a <<= b)A bitwise left-shift compound assignment, such as (a <<= b).

LessThan 20

“小于”比较,如 (a < b)A "less than" comparison, such as (a < b).

LessThanOrEqual 21

“小于或等于”比较,如 (a <= b)A "less than or equal to" comparison, such as (a <= b).

ListInit 22

创建新的 IEnumerable 对象并从元素列表中初始化该对象的运算,如 C# 中的 new List<SampleType>(){ a, b, c } 或 Visual Basic 中的 Dim sampleList = { a, b, c }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

一个循环,例如 forwhileA loop, such as for or while.

MemberAccess 23

从字段或属性进行读取的运算,如 obj.SamplePropertyAn operation that reads from a field or property, such as obj.SampleProperty.

MemberInit 24

创建新的对象并初始化其一个或多个成员的运算,如 C# 中的 new Point { X = 1, Y = 2 } 或 Visual Basic 中的 New Point With {.X = 1, .Y = 2}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

算术余数运算,如 C# 中的 (a % b) 或 Visual Basic 中的 (a Mod b)An arithmetic remainder operation, such as (a % b) in C# or (a Mod b) in Visual Basic.

ModuloAssign 68

算术余数复合赋值运算,如 C# 中的 (a %= b)An arithmetic remainder compound assignment operation, such as (a %= b) in C#.

Multiply 26

乘法运算,如 (a * b),针对数值操作数,不进行溢出检查。A multiplication operation, such as (a * b), without overflow checking, for numeric operands.

MultiplyAssign 69

乘法复合赋值运算,如 (a *= b),针对数值操作数,不进行溢出检查。A multiplication compound assignment operation, such as (a *= b), without overflow checking, for numeric operands.

MultiplyAssignChecked 75

乘法复合赋值运算,如 (a *= b),针对数值操作数,进行溢出检查。A multiplication compound assignment operation, such as (a *= b), that has overflow checking, for numeric operands.

MultiplyChecked 27

乘法运算,如 (a * b),针对数值操作数,进行溢出检查。An multiplication operation, such as (a * b), that has overflow checking, for numeric operands.

Negate 28

算术求反运算,如 (-a)An arithmetic negation operation, such as (-a). 不应就地修改 a 对象。The object a should not be modified in place.

NegateChecked 30

算术求反运算,如 (-a),进行溢出检查。An arithmetic negation operation, such as (-a), that has overflow checking. 不应就地修改 a 对象。The object a should not be modified in place.

New 31

调用构造函数创建新对象的运算,如 new SampleType()An operation that calls a constructor to create a new object, such as new SampleType().

NewArrayBounds 33

创建新数组(其中每个维度的界限均已指定)的运算,如 C# 中的 new SampleType[dim1, dim2] 或 Visual Basic 中的 New SampleType(dim1, dim2)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

创建新的一维数组并从元素列表中初始化该数组的运算,如 C# 中的 new SampleType[]{a, b, c} 或 Visual Basic 中的 New SampleType(){a, b, c}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. 在 C# 中,它与整型的 (~a) 和布尔值的 (!a) 等效。In C#, it is equivalent to (~a) for integral types and to (!a) for Boolean values. 在 Visual Basic 中,它与 (Not a) 等效。In Visual Basic, it is equivalent to (Not a). 不应就地修改 a 对象。The object a should not be modified in place.

NotEqual 35

不相等比较,如 C# 中的 (a != b) 或 Visual Basic 中的 (a <> b)An inequality comparison, such as (a != b) in C# or (a <> b) in Visual Basic.

OnesComplement 82

二进制反码运算,如 C# 中的 (~a)A ones complement operation, such as (~a) in C#.

Or 36

按位或逻辑 OR 运算,如 C# 中的 (a | b) 和 Visual Basic 中的 (a Or b)A bitwise or logical OR operation, such as (a | b) in C# or (a Or b) in Visual Basic.

OrAssign 70

按位或逻辑 OR 复合赋值运算,如 C# 中的 (a |= b)A bitwise or logical OR compound assignment, such as (a |= b) in C#.

OrElse 37

短路条件 OR 运算,如 C# 中的 (a || b) 或 Visual Basic 中的 (a OrElse b)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. 有关详细信息,请参阅 ParameterExpressionFor more information, see ParameterExpression.

PostDecrementAssign 80

一元后缀递减,如 (a--)A unary postfix decrement, such as (a--). 应就地修改 a 对象。The object a should be modified in place.

PostIncrementAssign 79

一元后缀递增,如 (a++)A unary postfix increment, such as (a++). 应就地修改 a 对象。The object a should be modified in place.

Power 39

对某个数字进行幂运算的数学运算,如 Visual Basic 中的 (a ^ b)A mathematical operation that raises a number to a power, such as (a ^ b) in Visual Basic.

PowerAssign 71

对某个数字进行幂运算的复合赋值运算,如 Visual Basic 中的(a ^= b)A compound assignment operation that raises a number to a power, such as (a ^= b) in Visual Basic.

PreDecrementAssign 78

一元前缀递减,如 (--a)A unary prefix decrement, such as (--a). 应就地修改 a 对象。The object a should be modified in place.

PreIncrementAssign 77

一元前缀递增,如 (++a)A unary prefix increment, such as (++a). 应就地修改 a 对象。The object a should be modified in place.

Quote 40

具有类型为 Expression 的常量值的表达式。An expression that has a constant value of type Expression. Quote 节点可包含对参数的引用,这些参数在该节点表示的表达式的上下文中定义。A Quote node can contain references to parameters that are defined in the context of the expression it represents.

RightShift 41

按位右移运算,如 (a >> b)A bitwise right-shift operation, such as (a >> b).

RightShiftAssign 72

按位右移复合赋值运算,如 (a >>= b)A bitwise right-shift compound assignment operation, such as (a >>= b).

RuntimeVariables 57

运行时变量的列表。A list of run-time variables. 有关详细信息,请参阅 RuntimeVariablesExpressionFor more information, see RuntimeVariablesExpression.

Subtract 42

减法运算,如 (a - b),针对数值操作数,不进行溢出检查。A subtraction operation, such as (a - b), without overflow checking, for numeric operands.

SubtractAssign 73

减法复合赋值运算,如 (a -= b),针对数值操作数,不进行溢出检查。A subtraction compound assignment operation, such as (a -= b), without overflow checking, for numeric operands.

SubtractAssignChecked 76

减法复合赋值运算,如 (a -= b),针对数值操作数,进行溢出检查。A subtraction compound assignment operation, such as (a -= b), that has overflow checking, for numeric operands.

SubtractChecked 43

算术减法运算,如 (a - b),针对数值操作数,进行溢出检查。An arithmetic subtraction operation, such as (a - b), that has overflow checking, for numeric operands.

Switch 59

多分支选择运算,如 C# 中的 switch 或 Visual Basic 中的 Select CaseA 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

try-catch 表达式。A try-catch expression.

TypeAs 44

显式引用或装箱转换,其中如果转换失败则提供 null,如 C# 中的 (obj as SampleType) 或 Visual Basic 中的 TryCast(obj, SampleType)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

类型测试,如 C# 中的 obj is SampleType 或 Visual Basic 中的 TypeOf obj is SampleTypeA type test, such as obj is SampleType in C# or TypeOf obj is SampleType in Visual Basic.

UnaryPlus 29

一元加法运算,如 (+a)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

取消装箱值类型运算,如 MSIL 中的 unboxunbox.any 指令。An unbox value type operation, such as unbox and unbox.any instructions in MSIL.

注解

有关此类型的每个枚举值的详细信息, 请参阅动态语言运行时概述For more information about each enumeration value of this type, see Dynamic Language Runtime Overview.

适用于