Expression Expression Expression Expression Class

定义

提供一种基类,表示表达式树节点的类派生自该基类。Provides the base class from which the classes that represent expression tree nodes are derived. 它还包含用来创建各种节点类型的 static(在 Visual Basic 中为 Shared)工厂方法。It also contains static (Shared in Visual Basic) factory methods to create the various node types. 这是一个 abstract 类。This is an abstract class.

public ref class Expression abstract
public abstract class Expression
type Expression = class
Public MustInherit Class Expression
继承
ExpressionExpressionExpressionExpression
派生

示例

下面的代码示例演示如何创建块表达式。The following code example shows how to create a block expression. 块表达式包含两个MethodCallExpression对象,另一个ConstantExpression对象。The block expression consists of two MethodCallExpression objects and one ConstantExpression object.

// Add the following directive to your file:
// using System.Linq.Expressions;  

// The block expression allows for executing several expressions sequentually.
// When the block expression is executed,
// it returns the value of the last expression in the sequence.
BlockExpression blockExpr = Expression.Block(
    Expression.Call(
        null,
        typeof(Console).GetMethod("Write", new Type[] { typeof(String) }),
        Expression.Constant("Hello ")
       ),
    Expression.Call(
        null,
        typeof(Console).GetMethod("WriteLine", new Type[] { typeof(String) }),
        Expression.Constant("World!")
        ),
    Expression.Constant(42)
);

Console.WriteLine("The result of executing the expression tree:");
// The following statement first creates an expression tree,
// then compiles it, and then executes it.           
var result = Expression.Lambda<Func<int>>(blockExpr).Compile()();

// Print out the expressions from the block expression.
Console.WriteLine("The expressions from the block expression:");
foreach (var expr in blockExpr.Expressions)
    Console.WriteLine(expr.ToString());

// Print out the result of the tree execution.
Console.WriteLine("The return value of the block expression:");
Console.WriteLine(result);

// This code example produces the following output:
//
// The result of executing the expression tree:
// Hello World!

// The expressions from the block expression:
// Write("Hello ")
// WriteLine("World!")
// 42

// The return value of the block expression:
// 42
' Add the following directive to your file:
' Imports System.Linq.Expressions

' The block expression enables you to execute several expressions sequentually.
' When the block expression is executed,
' it returns the value of the last expression in the sequence.
Dim blockExpr As BlockExpression = Expression.Block(
    Expression.Call(
        Nothing,
        GetType(Console).GetMethod("Write", New Type() {GetType(String)}),
        Expression.Constant("Hello ")
       ),
    Expression.Call(
        Nothing,
        GetType(Console).GetMethod("WriteLine", New Type() {GetType(String)}),
        Expression.Constant("World!")
        ),
    Expression.Constant(42)
)

Console.WriteLine("The result of executing the expression tree:")
' The following statement first creates an expression tree,
' then compiles it, and then executes it.           
Dim result = Expression.Lambda(Of Func(Of Integer))(blockExpr).Compile()()

' Print the expressions from the block expression.
Console.WriteLine("The expressions from the block expression:")
For Each expr In blockExpr.Expressions
    Console.WriteLine(expr.ToString())
Next

' Print the result of the tree execution.
Console.WriteLine("The return value of the block expression:")
Console.WriteLine(result)

' This code example produces the following output:
'
' The result of executing the expression tree:
' Hello World!

' The expressions from the block expression:
' Write("Hello ")
' WriteLine("World!")
' 42

' The return value of the block expression:
' 42

构造函数

Expression() Expression() Expression() Expression()

构造 Expression 的新实例。Constructs a new instance of Expression.

Expression(ExpressionType, Type) Expression(ExpressionType, Type) Expression(ExpressionType, Type) Expression(ExpressionType, Type)

初始化 Expression 类的新实例。Initializes a new instance of the Expression class.

属性

CanReduce CanReduce CanReduce CanReduce

指示可将节点简化为更简单的节点。Indicates that the node can be reduced to a simpler node. 如果返回 true,则可以调用 Reduce() 以生成简化形式。If this returns true, Reduce() can be called to produce the reduced form.

NodeType NodeType NodeType NodeType

获取此 Expression 的节点类型。Gets the node type of this Expression.

Type Type Type Type

获取此 Expression 表示的表达式的静态类型。Gets the static type of the expression that this Expression represents.

方法

Accept(ExpressionVisitor) Accept(ExpressionVisitor) Accept(ExpressionVisitor) Accept(ExpressionVisitor)

调度到此节点类型的特定 Visit 方法。Dispatches to the specific visit method for this node type. 例如,MethodCallExpression 调用 VisitMethodCall(MethodCallExpression)For example, MethodCallExpression calls the VisitMethodCall(MethodCallExpression).

Add(Expression, Expression) Add(Expression, Expression) Add(Expression, Expression) Add(Expression, Expression)

创建一个表示不进行溢出检查的算术加法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic addition operation that does not have overflow checking.

Add(Expression, Expression, MethodInfo) Add(Expression, Expression, MethodInfo) Add(Expression, Expression, MethodInfo) Add(Expression, Expression, MethodInfo)

创建一个表示不进行溢出检查的算术加法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic addition operation that does not have overflow checking. 可指定实现方法。The implementing method can be specified.

AddAssign(Expression, Expression) AddAssign(Expression, Expression) AddAssign(Expression, Expression) AddAssign(Expression, Expression)

创建一个表示不进行溢出检查的加法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.

AddAssign(Expression, Expression, MethodInfo) AddAssign(Expression, Expression, MethodInfo) AddAssign(Expression, Expression, MethodInfo) AddAssign(Expression, Expression, MethodInfo)

创建一个表示不进行溢出检查的加法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.

AddAssign(Expression, Expression, MethodInfo, LambdaExpression) AddAssign(Expression, Expression, MethodInfo, LambdaExpression) AddAssign(Expression, Expression, MethodInfo, LambdaExpression) AddAssign(Expression, Expression, MethodInfo, LambdaExpression)

创建一个表示不进行溢出检查的加法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents an addition assignment operation that does not have overflow checking.

AddAssignChecked(Expression, Expression) AddAssignChecked(Expression, Expression) AddAssignChecked(Expression, Expression) AddAssignChecked(Expression, Expression)

创建一个表示进行溢出检查的加法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents an addition assignment operation that has overflow checking.

AddAssignChecked(Expression, Expression, MethodInfo) AddAssignChecked(Expression, Expression, MethodInfo) AddAssignChecked(Expression, Expression, MethodInfo) AddAssignChecked(Expression, Expression, MethodInfo)

创建一个表示进行溢出检查的加法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents an addition assignment operation that has overflow checking.

AddAssignChecked(Expression, Expression, MethodInfo, LambdaExpression) AddAssignChecked(Expression, Expression, MethodInfo, LambdaExpression) AddAssignChecked(Expression, Expression, MethodInfo, LambdaExpression) AddAssignChecked(Expression, Expression, MethodInfo, LambdaExpression)

创建一个表示进行溢出检查的加法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents an addition assignment operation that has overflow checking.

AddChecked(Expression, Expression) AddChecked(Expression, Expression) AddChecked(Expression, Expression) AddChecked(Expression, Expression)

创建一个表示进行溢出检查的算术加法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic addition operation that has overflow checking.

AddChecked(Expression, Expression, MethodInfo) AddChecked(Expression, Expression, MethodInfo) AddChecked(Expression, Expression, MethodInfo) AddChecked(Expression, Expression, MethodInfo)

创建一个表示进行溢出检查的算术加法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic addition operation that has overflow checking. 可指定实现方法。The implementing method can be specified.

And(Expression, Expression) And(Expression, Expression) And(Expression, Expression) And(Expression, Expression)

创建一个表示按位 BinaryExpression 运算的 ANDCreates a BinaryExpression that represents a bitwise AND operation.

And(Expression, Expression, MethodInfo) And(Expression, Expression, MethodInfo) And(Expression, Expression, MethodInfo) And(Expression, Expression, MethodInfo)

创建一个表示按位 BinaryExpression 运算的 ANDCreates a BinaryExpression that represents a bitwise AND operation. 可指定实现方法。The implementing method can be specified.

AndAlso(Expression, Expression) AndAlso(Expression, Expression) AndAlso(Expression, Expression) AndAlso(Expression, Expression)

创建一个 BinaryExpression,它表示仅在第一个操作数的计算结果为 AND 时才计算第二个操作数的条件 true 运算。Creates a BinaryExpression that represents a conditional AND operation that evaluates the second operand only if the first operand evaluates to true.

AndAlso(Expression, Expression, MethodInfo) AndAlso(Expression, Expression, MethodInfo) AndAlso(Expression, Expression, MethodInfo) AndAlso(Expression, Expression, MethodInfo)

创建一个 BinaryExpression,它表示仅在第一个操作数解析为 true 时,才计算第二个操作数的条件 AND 运算。Creates a BinaryExpression that represents a conditional AND operation that evaluates the second operand only if the first operand is resolved to true. 可指定实现方法。The implementing method can be specified.

AndAssign(Expression, Expression) AndAssign(Expression, Expression) AndAssign(Expression, Expression) AndAssign(Expression, Expression)

创建一个表示按位 AND 赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise AND assignment operation.

AndAssign(Expression, Expression, MethodInfo) AndAssign(Expression, Expression, MethodInfo) AndAssign(Expression, Expression, MethodInfo) AndAssign(Expression, Expression, MethodInfo)

创建一个表示按位 AND 赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise AND assignment operation.

AndAssign(Expression, Expression, MethodInfo, LambdaExpression) AndAssign(Expression, Expression, MethodInfo, LambdaExpression) AndAssign(Expression, Expression, MethodInfo, LambdaExpression) AndAssign(Expression, Expression, MethodInfo, LambdaExpression)

创建一个表示按位 AND 赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise AND assignment operation.

ArrayAccess(Expression, Expression[]) ArrayAccess(Expression, Expression[]) ArrayAccess(Expression, Expression[]) ArrayAccess(Expression, Expression[])

创建一个用于访问数组的 IndexExpressionCreates an IndexExpression to access an array.

ArrayAccess(Expression, IEnumerable<Expression>) ArrayAccess(Expression, IEnumerable<Expression>) ArrayAccess(Expression, IEnumerable<Expression>) ArrayAccess(Expression, IEnumerable<Expression>)

创建一个用于访问多维数组的 IndexExpressionCreates an IndexExpression to access a multidimensional array.

ArrayIndex(Expression, Expression) ArrayIndex(Expression, Expression) ArrayIndex(Expression, Expression) ArrayIndex(Expression, Expression)

创建一个 BinaryExpression,它表示将数组索引运算符应用到级别一的数组中。Creates a BinaryExpression that represents applying an array index operator to an array of rank one.

ArrayIndex(Expression, Expression[]) ArrayIndex(Expression, Expression[]) ArrayIndex(Expression, Expression[]) ArrayIndex(Expression, Expression[])

创建一个 MethodCallExpression,它表示将数组索引运算符应用到多维数组中。Creates a MethodCallExpression that represents applying an array index operator to a multidimensional array.

ArrayIndex(Expression, IEnumerable<Expression>) ArrayIndex(Expression, IEnumerable<Expression>) ArrayIndex(Expression, IEnumerable<Expression>) ArrayIndex(Expression, IEnumerable<Expression>)

创建一个 MethodCallExpression,它表示将数组索引运算符应用到多个级别的数组中。Creates a MethodCallExpression that represents applying an array index operator to an array of rank more than one.

ArrayLength(Expression) ArrayLength(Expression) ArrayLength(Expression) ArrayLength(Expression)

创建一个 UnaryExpression,它表示获取一维数组的长度的表达式。Creates a UnaryExpression that represents an expression for obtaining the length of a one-dimensional array.

Assign(Expression, Expression) Assign(Expression, Expression) Assign(Expression, Expression) Assign(Expression, Expression)

创建一个表示赋值运算的 BinaryExpressionCreates a BinaryExpression that represents an assignment operation.

Bind(MemberInfo, Expression) Bind(MemberInfo, Expression) Bind(MemberInfo, Expression) Bind(MemberInfo, Expression)

创建一个 MemberAssignment,它表示字段或属性的初始化。Creates a MemberAssignment that represents the initialization of a field or property.

Bind(MethodInfo, Expression) Bind(MethodInfo, Expression) Bind(MethodInfo, Expression) Bind(MethodInfo, Expression)

使用属性访问器方法,创建一个表示成员初始化的 MemberAssignmentCreates a MemberAssignment that represents the initialization of a member by using a property accessor method.

Block(Expression, Expression) Block(Expression, Expression) Block(Expression, Expression) Block(Expression, Expression)

创建一个 BlockExpression,其中包含两个表达式,但不包含任何变量。Creates a BlockExpression that contains two expressions and has no variables.

Block(Expression, Expression, Expression) Block(Expression, Expression, Expression) Block(Expression, Expression, Expression) Block(Expression, Expression, Expression)

创建一个 BlockExpression,其中包含三个表达式,但不包含任何变量。Creates a BlockExpression that contains three expressions and has no variables.

Block(Expression, Expression, Expression, Expression) Block(Expression, Expression, Expression, Expression) Block(Expression, Expression, Expression, Expression) Block(Expression, Expression, Expression, Expression)

创建一个 BlockExpression,其中包含四个表达式,但不包含任何变量。Creates a BlockExpression that contains four expressions and has no variables.

Block(Expression, Expression, Expression, Expression, Expression) Block(Expression, Expression, Expression, Expression, Expression) Block(Expression, Expression, Expression, Expression, Expression) Block(Expression, Expression, Expression, Expression, Expression)

创建一个 BlockExpression,其中包含五个表达式,但不包含任何变量。Creates a BlockExpression that contains five expressions and has no variables.

Block(Expression[]) Block(Expression[]) Block(Expression[]) Block(Expression[])

创建一个 BlockExpression,其中包含给定表达式,但不包含任何变量。Creates a BlockExpression that contains the given expressions and has no variables.

Block(IEnumerable<Expression>) Block(IEnumerable<Expression>) Block(IEnumerable<Expression>) Block(IEnumerable<Expression>)

创建一个 BlockExpression,其中包含给定表达式,但不包含任何变量。Creates a BlockExpression that contains the given expressions and has no variables.

Block(IEnumerable<ParameterExpression>, Expression[]) Block(IEnumerable<ParameterExpression>, Expression[]) Block(IEnumerable<ParameterExpression>, Expression[]) Block(IEnumerable<ParameterExpression>, Expression[])

创建一个 BlockExpression,其中包含给定的变量和表达式。Creates a BlockExpression that contains the given variables and expressions.

Block(IEnumerable<ParameterExpression>, IEnumerable<Expression>) Block(IEnumerable<ParameterExpression>, IEnumerable<Expression>) Block(IEnumerable<ParameterExpression>, IEnumerable<Expression>) Block(IEnumerable<ParameterExpression>, IEnumerable<Expression>)

创建一个 BlockExpression,其中包含给定的变量和表达式。Creates a BlockExpression that contains the given variables and expressions.

Block(Type, Expression[]) Block(Type, Expression[]) Block(Type, Expression[]) Block(Type, Expression[])

创建一个 BlockExpression,其中包含给定表达式和特定结果类型,但不包含任何变量。Creates a BlockExpression that contains the given expressions, has no variables and has specific result type.

Block(Type, IEnumerable<Expression>) Block(Type, IEnumerable<Expression>) Block(Type, IEnumerable<Expression>) Block(Type, IEnumerable<Expression>)

创建一个 BlockExpression,其中包含给定表达式和特定结果类型,但不包含任何变量。Creates a BlockExpression that contains the given expressions, has no variables and has specific result type.

Block(Type, IEnumerable<ParameterExpression>, Expression[]) Block(Type, IEnumerable<ParameterExpression>, Expression[]) Block(Type, IEnumerable<ParameterExpression>, Expression[]) Block(Type, IEnumerable<ParameterExpression>, Expression[])

创建一个 BlockExpression,其中包含给定的变量和表达式。Creates a BlockExpression that contains the given variables and expressions.

Block(Type, IEnumerable<ParameterExpression>, IEnumerable<Expression>) Block(Type, IEnumerable<ParameterExpression>, IEnumerable<Expression>) Block(Type, IEnumerable<ParameterExpression>, IEnumerable<Expression>) Block(Type, IEnumerable<ParameterExpression>, IEnumerable<Expression>)

创建一个 BlockExpression,其中包含给定的变量和表达式。Creates a BlockExpression that contains the given variables and expressions.

Break(LabelTarget) Break(LabelTarget) Break(LabelTarget) Break(LabelTarget)

创建一个表示 break 语句的 GotoExpressionCreates a GotoExpression representing a break statement.

Break(LabelTarget, Expression) Break(LabelTarget, Expression) Break(LabelTarget, Expression) Break(LabelTarget, Expression)

创建一个表示 break 语句的 GotoExpressionCreates a GotoExpression representing a break statement. 可以指定在跳转时传递给标签的值。The value passed to the label upon jumping can be specified.

Break(LabelTarget, Expression, Type) Break(LabelTarget, Expression, Type) Break(LabelTarget, Expression, Type) Break(LabelTarget, Expression, Type)

创建一个表示具有指定类型的 break 语句的 GotoExpressionCreates a GotoExpression representing a break statement with the specified type. 可以指定在跳转时传递给标签的值。The value passed to the label upon jumping can be specified.

Break(LabelTarget, Type) Break(LabelTarget, Type) Break(LabelTarget, Type) Break(LabelTarget, Type)

创建一个表示具有指定类型的 break 语句的 GotoExpressionCreates a GotoExpression representing a break statement with the specified type.

Call(Expression, MethodInfo) Call(Expression, MethodInfo) Call(Expression, MethodInfo) Call(Expression, MethodInfo)

创建一个 MethodCallExpression,它表示调用不带自变量的方法。Creates a MethodCallExpression that represents a call to a method that takes no arguments.

Call(Expression, MethodInfo, Expression, Expression) Call(Expression, MethodInfo, Expression, Expression) Call(Expression, MethodInfo, Expression, Expression) Call(Expression, MethodInfo, Expression, Expression)

创建一个 MethodCallExpression,它表示对采用两个参数的方法的调用。Creates a MethodCallExpression that represents a call to a method that takes two arguments.

Call(Expression, MethodInfo, Expression, Expression, Expression) Call(Expression, MethodInfo, Expression, Expression, Expression) Call(Expression, MethodInfo, Expression, Expression, Expression) Call(Expression, MethodInfo, Expression, Expression, Expression)

创建一个 MethodCallExpression,它表示对使用三个参数的方法的调用。Creates a MethodCallExpression that represents a call to a method that takes three arguments.

Call(Expression, MethodInfo, Expression[]) Call(Expression, MethodInfo, Expression[]) Call(Expression, MethodInfo, Expression[]) Call(Expression, MethodInfo, Expression[])

创建一个表示调用带参数的方法的 MethodCallExpressionCreates a MethodCallExpression that represents a call to a method that takes arguments.

Call(Expression, MethodInfo, IEnumerable<Expression>) Call(Expression, MethodInfo, IEnumerable<Expression>) Call(Expression, MethodInfo, IEnumerable<Expression>) Call(Expression, MethodInfo, IEnumerable<Expression>)

创建一个表示调用带参数的方法的 MethodCallExpressionCreates a MethodCallExpression that represents a call to a method that takes arguments.

Call(Expression, String, Type[], Expression[]) Call(Expression, String, Type[], Expression[]) Call(Expression, String, Type[], Expression[]) Call(Expression, String, Type[], Expression[])

通过调用合适的工厂方法,创建一个 MethodCallExpression,它表示方法调用。Creates a MethodCallExpression that represents a call to a method by calling the appropriate factory method.

Call(MethodInfo, Expression) Call(MethodInfo, Expression) Call(MethodInfo, Expression) Call(MethodInfo, Expression)

创建一个 MethodCallExpression,它表示对使用一个参数的 static 方法(在 Visual Basic 中为 Shared 方法)的调用。Creates a MethodCallExpression that represents a call to a static (Shared in Visual Basic) method that takes one argument.

Call(MethodInfo, Expression, Expression) Call(MethodInfo, Expression, Expression) Call(MethodInfo, Expression, Expression) Call(MethodInfo, Expression, Expression)

创建一个 MethodCallExpression,它表示对使用两个参数的静态方法的调用。Creates a MethodCallExpression that represents a call to a static method that takes two arguments.

Call(MethodInfo, Expression, Expression, Expression) Call(MethodInfo, Expression, Expression, Expression) Call(MethodInfo, Expression, Expression, Expression) Call(MethodInfo, Expression, Expression, Expression)

创建一个 MethodCallExpression,它表示对使用三个参数的静态方法的调用。Creates a MethodCallExpression that represents a call to a static method that takes three arguments.

Call(MethodInfo, Expression, Expression, Expression, Expression) Call(MethodInfo, Expression, Expression, Expression, Expression) Call(MethodInfo, Expression, Expression, Expression, Expression) Call(MethodInfo, Expression, Expression, Expression, Expression)

创建一个 MethodCallExpression,它表示对使用四个参数的静态方法的调用。Creates a MethodCallExpression that represents a call to a static method that takes four arguments.

Call(MethodInfo, Expression, Expression, Expression, Expression, Expression) Call(MethodInfo, Expression, Expression, Expression, Expression, Expression) Call(MethodInfo, Expression, Expression, Expression, Expression, Expression) Call(MethodInfo, Expression, Expression, Expression, Expression, Expression)

创建一个 MethodCallExpression,它表示对使用五个参数的静态方法的调用。Creates a MethodCallExpression that represents a call to a static method that takes five arguments.

Call(MethodInfo, Expression[]) Call(MethodInfo, Expression[]) Call(MethodInfo, Expression[]) Call(MethodInfo, Expression[])

创建一个 MethodCallExpression,它表示调用有参数的 static(在 Visual Basic 中为 Shared)方法。Creates a MethodCallExpression that represents a call to a static (Shared in Visual Basic) method that has arguments.

Call(MethodInfo, IEnumerable<Expression>) Call(MethodInfo, IEnumerable<Expression>) Call(MethodInfo, IEnumerable<Expression>) Call(MethodInfo, IEnumerable<Expression>)

创建一个 MethodCallExpression,它表示对 static 方法(在 Visual Basic 中为 Shared 方法)的调用。Creates a MethodCallExpression that represents a call to a static (Shared in Visual Basic) method.

Call(Type, String, Type[], Expression[]) Call(Type, String, Type[], Expression[]) Call(Type, String, Type[], Expression[]) Call(Type, String, Type[], Expression[])

通过调用合适的工厂方法,创建一个 MethodCallExpression,它表示对 static(在 Visual Basic 中为 Shared)方法的调用。Creates a MethodCallExpression that represents a call to a static (Shared in Visual Basic) method by calling the appropriate factory method.

Catch(ParameterExpression, Expression) Catch(ParameterExpression, Expression) Catch(ParameterExpression, Expression) Catch(ParameterExpression, Expression)

创建一个表示 catch 语句的 CatchBlock,其中具有对已捕获的 Exception 对象的引用以便在处理程序主体中使用。Creates a CatchBlock representing a catch statement with a reference to the caught Exception object for use in the handler body.

Catch(ParameterExpression, Expression, Expression) Catch(ParameterExpression, Expression, Expression) Catch(ParameterExpression, Expression, Expression) Catch(ParameterExpression, Expression, Expression)

创建一个表示 catch 语句的 CatchBlock,其中具有 Exception 筛选器和对已捕获的 Exception 对象的引用。Creates a CatchBlock representing a catch statement with an Exception filter and a reference to the caught Exception object.

Catch(Type, Expression) Catch(Type, Expression) Catch(Type, Expression) Catch(Type, Expression)

创建一个表示 catch 语句的 CatchBlockCreates a CatchBlock representing a catch statement.

Catch(Type, Expression, Expression) Catch(Type, Expression, Expression) Catch(Type, Expression, Expression) Catch(Type, Expression, Expression)

创建一个表示 catch 语句的 CatchBlock,其中具有 Exception 筛选器,但没有对已捕获的 Exception 对象的引用。Creates a CatchBlock representing a catch statement with an Exception filter but no reference to the caught Exception object.

ClearDebugInfo(SymbolDocumentInfo) ClearDebugInfo(SymbolDocumentInfo) ClearDebugInfo(SymbolDocumentInfo) ClearDebugInfo(SymbolDocumentInfo)

创建一个用于清除序列点的 DebugInfoExpressionCreates a DebugInfoExpression for clearing a sequence point.

Coalesce(Expression, Expression) Coalesce(Expression, Expression) Coalesce(Expression, Expression) Coalesce(Expression, Expression)

创建一个表示合并运算的 BinaryExpressionCreates a BinaryExpression that represents a coalescing operation.

Coalesce(Expression, Expression, LambdaExpression) Coalesce(Expression, Expression, LambdaExpression) Coalesce(Expression, Expression, LambdaExpression) Coalesce(Expression, Expression, LambdaExpression)

在给定转换函数的情况下,创建一个表示合并运算的 BinaryExpressionCreates a BinaryExpression that represents a coalescing operation, given a conversion function.

Condition(Expression, Expression, Expression) Condition(Expression, Expression, Expression) Condition(Expression, Expression, Expression) Condition(Expression, Expression, Expression)

创建一个表示条件语句的 ConditionalExpressionCreates a ConditionalExpression that represents a conditional statement.

Condition(Expression, Expression, Expression, Type) Condition(Expression, Expression, Expression, Type) Condition(Expression, Expression, Expression, Type) Condition(Expression, Expression, Expression, Type)

创建一个表示条件语句的 ConditionalExpressionCreates a ConditionalExpression that represents a conditional statement.

Constant(Object) Constant(Object) Constant(Object) Constant(Object)

创建一个 ConstantExpression,它把 Value 属性设置为指定值。Creates a ConstantExpression that has the Value property set to the specified value.

Constant(Object, Type) Constant(Object, Type) Constant(Object, Type) Constant(Object, Type)

创建一个 ConstantExpression,它把 ValueType 属性设置为指定值。Creates a ConstantExpression that has the Value and Type properties set to the specified values.

Continue(LabelTarget) Continue(LabelTarget) Continue(LabelTarget) Continue(LabelTarget)

创建一个表示 continue 语句的 GotoExpressionCreates a GotoExpression representing a continue statement.

Continue(LabelTarget, Type) Continue(LabelTarget, Type) Continue(LabelTarget, Type) Continue(LabelTarget, Type)

创建一个表示具有指定类型的 continue 语句的 GotoExpressionCreates a GotoExpression representing a continue statement with the specified type.

Convert(Expression, Type) Convert(Expression, Type) Convert(Expression, Type) Convert(Expression, Type)

创建一个表示类型转换运算的 UnaryExpressionCreates a UnaryExpression that represents a type conversion operation.

Convert(Expression, Type, MethodInfo) Convert(Expression, Type, MethodInfo) Convert(Expression, Type, MethodInfo) Convert(Expression, Type, MethodInfo)

创建一个 UnaryExpression,它表示为其指定实现方法的转换运算。Creates a UnaryExpression that represents a conversion operation for which the implementing method is specified.

ConvertChecked(Expression, Type) ConvertChecked(Expression, Type) ConvertChecked(Expression, Type) ConvertChecked(Expression, Type)

创建一个 UnaryExpression,它表示在目标类型发生溢出时引发异常的转换运算。Creates a UnaryExpression that represents a conversion operation that throws an exception if the target type is overflowed.

ConvertChecked(Expression, Type, MethodInfo) ConvertChecked(Expression, Type, MethodInfo) ConvertChecked(Expression, Type, MethodInfo) ConvertChecked(Expression, Type, MethodInfo)

创建一个 UnaryExpression,它表示在目标类型发生溢出时引发异常且为其指定实现方法的转换运算。Creates a UnaryExpression that represents a conversion operation that throws an exception if the target type is overflowed and for which the implementing method is specified.

DebugInfo(SymbolDocumentInfo, Int32, Int32, Int32, Int32) DebugInfo(SymbolDocumentInfo, Int32, Int32, Int32, Int32) DebugInfo(SymbolDocumentInfo, Int32, Int32, Int32, Int32) DebugInfo(SymbolDocumentInfo, Int32, Int32, Int32, Int32)

创建一个具有指定跨度的 DebugInfoExpressionCreates a DebugInfoExpression with the specified span.

Decrement(Expression) Decrement(Expression) Decrement(Expression) Decrement(Expression)

创建一个 UnaryExpression,它表示按 1 递减表达式值。Creates a UnaryExpression that represents the decrementing of the expression by 1.

Decrement(Expression, MethodInfo) Decrement(Expression, MethodInfo) Decrement(Expression, MethodInfo) Decrement(Expression, MethodInfo)

创建一个 UnaryExpression,它表示按 1 递减表达式值。Creates a UnaryExpression that represents the decrementing of the expression by 1.

Default(Type) Default(Type) Default(Type) Default(Type)

创建一个 DefaultExpressionType 属性设置为指定类型。Creates a DefaultExpression that has the Type property set to the specified type.

Divide(Expression, Expression) Divide(Expression, Expression) Divide(Expression, Expression) Divide(Expression, Expression)

创建一个表示算术除法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic division operation.

Divide(Expression, Expression, MethodInfo) Divide(Expression, Expression, MethodInfo) Divide(Expression, Expression, MethodInfo) Divide(Expression, Expression, MethodInfo)

创建一个表示算术除法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic division operation. 可指定实现方法。The implementing method can be specified.

DivideAssign(Expression, Expression) DivideAssign(Expression, Expression) DivideAssign(Expression, Expression) DivideAssign(Expression, Expression)

创建一个表示不进行溢出检查的除法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a division assignment operation that does not have overflow checking.

DivideAssign(Expression, Expression, MethodInfo) DivideAssign(Expression, Expression, MethodInfo) DivideAssign(Expression, Expression, MethodInfo) DivideAssign(Expression, Expression, MethodInfo)

创建一个表示不进行溢出检查的除法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a division assignment operation that does not have overflow checking.

DivideAssign(Expression, Expression, MethodInfo, LambdaExpression) DivideAssign(Expression, Expression, MethodInfo, LambdaExpression) DivideAssign(Expression, Expression, MethodInfo, LambdaExpression) DivideAssign(Expression, Expression, MethodInfo, LambdaExpression)

创建一个表示不进行溢出检查的除法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a division assignment operation that does not have overflow checking.

Dynamic(CallSiteBinder, Type, Expression) Dynamic(CallSiteBinder, Type, Expression) Dynamic(CallSiteBinder, Type, Expression) Dynamic(CallSiteBinder, Type, Expression)

创建一个 DynamicExpression,它表示由提供的 CallSiteBinder 绑定的动态操作。Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.

Dynamic(CallSiteBinder, Type, Expression, Expression) Dynamic(CallSiteBinder, Type, Expression, Expression) Dynamic(CallSiteBinder, Type, Expression, Expression) Dynamic(CallSiteBinder, Type, Expression, Expression)

创建一个 DynamicExpression,它表示由提供的 CallSiteBinder 绑定的动态操作。Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.

Dynamic(CallSiteBinder, Type, Expression, Expression, Expression) Dynamic(CallSiteBinder, Type, Expression, Expression, Expression) Dynamic(CallSiteBinder, Type, Expression, Expression, Expression) Dynamic(CallSiteBinder, Type, Expression, Expression, Expression)

创建一个 DynamicExpression,它表示由提供的 CallSiteBinder 绑定的动态操作。Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.

Dynamic(CallSiteBinder, Type, Expression, Expression, Expression, Expression) Dynamic(CallSiteBinder, Type, Expression, Expression, Expression, Expression) Dynamic(CallSiteBinder, Type, Expression, Expression, Expression, Expression) Dynamic(CallSiteBinder, Type, Expression, Expression, Expression, Expression)

创建一个 DynamicExpression,它表示由提供的 CallSiteBinder 绑定的动态操作。Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.

Dynamic(CallSiteBinder, Type, Expression[]) Dynamic(CallSiteBinder, Type, Expression[]) Dynamic(CallSiteBinder, Type, Expression[]) Dynamic(CallSiteBinder, Type, Expression[])

创建一个 DynamicExpression,它表示由提供的 CallSiteBinder 绑定的动态操作。Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.

Dynamic(CallSiteBinder, Type, IEnumerable<Expression>) Dynamic(CallSiteBinder, Type, IEnumerable<Expression>) Dynamic(CallSiteBinder, Type, IEnumerable<Expression>) Dynamic(CallSiteBinder, Type, IEnumerable<Expression>)

创建一个 DynamicExpression,它表示由提供的 CallSiteBinder 绑定的动态操作。Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.

ElementInit(MethodInfo, Expression[]) ElementInit(MethodInfo, Expression[]) ElementInit(MethodInfo, Expression[]) ElementInit(MethodInfo, Expression[])

在给定值数组作为第二个参数的情况下,创建一个 ElementInitCreates an ElementInit, given an array of values as the second argument.

ElementInit(MethodInfo, IEnumerable<Expression>) ElementInit(MethodInfo, IEnumerable<Expression>) ElementInit(MethodInfo, IEnumerable<Expression>) ElementInit(MethodInfo, IEnumerable<Expression>)

在给定 ElementInit 作为第二个参数的情况下,创建一个 IEnumerable<T>Creates an ElementInit, given an IEnumerable<T> as the second argument.

Empty() Empty() Empty() Empty()

创建具有 Void 类型的空表达式。Creates an empty expression that has Void type.

Equal(Expression, Expression) Equal(Expression, Expression) Equal(Expression, Expression) Equal(Expression, Expression)

创建一个表示相等比较的 BinaryExpressionCreates a BinaryExpression that represents an equality comparison.

Equal(Expression, Expression, Boolean, MethodInfo) Equal(Expression, Expression, Boolean, MethodInfo) Equal(Expression, Expression, Boolean, MethodInfo) Equal(Expression, Expression, Boolean, MethodInfo)

创建一个表示相等比较的 BinaryExpressionCreates a BinaryExpression that represents an equality comparison. 可指定实现方法。The implementing method can be specified.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定指定的对象是否等于当前对象。Determines whether the specified object is equal to the current object.

(Inherited from Object)
ExclusiveOr(Expression, Expression) ExclusiveOr(Expression, Expression) ExclusiveOr(Expression, Expression) ExclusiveOr(Expression, Expression)

通过对用户定义的类型使用 op_ExclusiveOr,创建一个表示按位 XOR 运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise XOR operation, using op_ExclusiveOr for user-defined types.

ExclusiveOr(Expression, Expression, MethodInfo) ExclusiveOr(Expression, Expression, MethodInfo) ExclusiveOr(Expression, Expression, MethodInfo) ExclusiveOr(Expression, Expression, MethodInfo)

通过对用户定义的类型使用 op_ExclusiveOr,创建一个表示按位 XOR 运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise XOR operation, using op_ExclusiveOr for user-defined types. 可指定实现方法。The implementing method can be specified.

ExclusiveOrAssign(Expression, Expression) ExclusiveOrAssign(Expression, Expression) ExclusiveOrAssign(Expression, Expression) ExclusiveOrAssign(Expression, Expression)

通过对用户定义的类型使用 op_ExclusiveOr,创建一个表示按位 XOR 赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.

ExclusiveOrAssign(Expression, Expression, MethodInfo) ExclusiveOrAssign(Expression, Expression, MethodInfo) ExclusiveOrAssign(Expression, Expression, MethodInfo) ExclusiveOrAssign(Expression, Expression, MethodInfo)

通过对用户定义的类型使用 op_ExclusiveOr,创建一个表示按位 XOR 赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.

ExclusiveOrAssign(Expression, Expression, MethodInfo, LambdaExpression) ExclusiveOrAssign(Expression, Expression, MethodInfo, LambdaExpression) ExclusiveOrAssign(Expression, Expression, MethodInfo, LambdaExpression) ExclusiveOrAssign(Expression, Expression, MethodInfo, LambdaExpression)

通过对用户定义的类型使用 op_ExclusiveOr,创建一个表示按位 XOR 赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise XOR assignment operation, using op_ExclusiveOr for user-defined types.

Field(Expression, FieldInfo) Field(Expression, FieldInfo) Field(Expression, FieldInfo) Field(Expression, FieldInfo)

创建一个表示访问字段的 MemberExpressionCreates a MemberExpression that represents accessing a field.

Field(Expression, String) Field(Expression, String) Field(Expression, String) Field(Expression, String)

在给定字段名称的情况下,创建一个表示访问此字段的 MemberExpressionCreates a MemberExpression that represents accessing a field given the name of the field.

Field(Expression, Type, String) Field(Expression, Type, String) Field(Expression, Type, String) Field(Expression, Type, String)

创建一个表示访问字段的 MemberExpressionCreates a MemberExpression that represents accessing a field.

GetActionType(Type[]) GetActionType(Type[]) GetActionType(Type[]) GetActionType(Type[])

创建一个 Type 对象,它表示具有特定类型参数的泛型 System.Action 委托类型。Creates a Type object that represents a generic System.Action delegate type that has specific type arguments.

GetDelegateType(Type[]) GetDelegateType(Type[]) GetDelegateType(Type[]) GetDelegateType(Type[])

获取一个 Type 对象,表示具有特定类型参数的泛型 System.FuncSystem.Action 委托类型。Gets a Type object that represents a generic System.Func or System.Action delegate type that has specific type arguments.

GetFuncType(Type[]) GetFuncType(Type[]) GetFuncType(Type[]) GetFuncType(Type[])

创建一个 Type 对象,表示具有特定类型参数的泛型 System.Func 委托类型。Creates a Type object that represents a generic System.Func delegate type that has specific type arguments. 最后一个类型参数指定已创建委托的返回类型。The last type argument specifies the return type of the created delegate.

GetHashCode() GetHashCode() GetHashCode() GetHashCode()

作为默认哈希函数。Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

获取当前实例的 TypeGets the Type of the current instance.

(Inherited from Object)
Goto(LabelTarget) Goto(LabelTarget) Goto(LabelTarget) Goto(LabelTarget)

创建一个表示“go to”语句的 GotoExpressionCreates a GotoExpression representing a "go to" statement.

Goto(LabelTarget, Expression) Goto(LabelTarget, Expression) Goto(LabelTarget, Expression) Goto(LabelTarget, Expression)

创建一个表示“go to”语句的 GotoExpressionCreates a GotoExpression representing a "go to" statement. 可以指定在跳转时传递给标签的值。The value passed to the label upon jumping can be specified.

Goto(LabelTarget, Expression, Type) Goto(LabelTarget, Expression, Type) Goto(LabelTarget, Expression, Type) Goto(LabelTarget, Expression, Type)

创建一个表示具有指定类型的“go to”语句的 GotoExpressionCreates a GotoExpression representing a "go to" statement with the specified type. 可以指定在跳转时传递给标签的值。The value passed to the label upon jumping can be specified.

Goto(LabelTarget, Type) Goto(LabelTarget, Type) Goto(LabelTarget, Type) Goto(LabelTarget, Type)

创建一个表示具有指定类型的“go to”语句的 GotoExpressionCreates a GotoExpression representing a "go to" statement with the specified type.

GreaterThan(Expression, Expression) GreaterThan(Expression, Expression) GreaterThan(Expression, Expression) GreaterThan(Expression, Expression)

创建一个表示“大于”数值比较的 BinaryExpressionCreates a BinaryExpression that represents a "greater than" numeric comparison.

GreaterThan(Expression, Expression, Boolean, MethodInfo) GreaterThan(Expression, Expression, Boolean, MethodInfo) GreaterThan(Expression, Expression, Boolean, MethodInfo) GreaterThan(Expression, Expression, Boolean, MethodInfo)

创建一个表示“大于”数值比较的 BinaryExpressionCreates a BinaryExpression that represents a "greater than" numeric comparison. 可指定实现方法。The implementing method can be specified.

GreaterThanOrEqual(Expression, Expression) GreaterThanOrEqual(Expression, Expression) GreaterThanOrEqual(Expression, Expression) GreaterThanOrEqual(Expression, Expression)

创建一个表示“大于或等于”数值比较的 BinaryExpressionCreates a BinaryExpression that represents a "greater than or equal" numeric comparison.

GreaterThanOrEqual(Expression, Expression, Boolean, MethodInfo) GreaterThanOrEqual(Expression, Expression, Boolean, MethodInfo) GreaterThanOrEqual(Expression, Expression, Boolean, MethodInfo) GreaterThanOrEqual(Expression, Expression, Boolean, MethodInfo)

创建一个表示“大于或等于”数值比较的 BinaryExpressionCreates a BinaryExpression that represents a "greater than or equal" numeric comparison.

IfThen(Expression, Expression) IfThen(Expression, Expression) IfThen(Expression, Expression) IfThen(Expression, Expression)

创建一个 ConditionalExpression,它表示带 if 语句的条件块。Creates a ConditionalExpression that represents a conditional block with an if statement.

IfThenElse(Expression, Expression, Expression) IfThenElse(Expression, Expression, Expression) IfThenElse(Expression, Expression, Expression) IfThenElse(Expression, Expression, Expression)

创建一个 ConditionalExpression,它表示带 ifelse 语句的条件块。Creates a ConditionalExpression that represents a conditional block with if and else statements.

Increment(Expression) Increment(Expression) Increment(Expression) Increment(Expression)

创建一个 UnaryExpression,它表示按 1 递增表达式值。Creates a UnaryExpression that represents the incrementing of the expression value by 1.

Increment(Expression, MethodInfo) Increment(Expression, MethodInfo) Increment(Expression, MethodInfo) Increment(Expression, MethodInfo)

创建一个 UnaryExpression,它表示按 1 递增表达式值。Creates a UnaryExpression that represents the incrementing of the expression by 1.

Invoke(Expression, Expression[]) Invoke(Expression, Expression[]) Invoke(Expression, Expression[]) Invoke(Expression, Expression[])

创建一个 InvocationExpression,它将委托或 Lambda 表达式应用于一个自变量表达式列表。Creates an InvocationExpression that applies a delegate or lambda expression to a list of argument expressions.

Invoke(Expression, IEnumerable<Expression>) Invoke(Expression, IEnumerable<Expression>) Invoke(Expression, IEnumerable<Expression>) Invoke(Expression, IEnumerable<Expression>)

创建一个 InvocationExpression,它将委托或 Lambda 表达式应用于一个自变量表达式列表。Creates an InvocationExpression that applies a delegate or lambda expression to a list of argument expressions.

IsFalse(Expression) IsFalse(Expression) IsFalse(Expression) IsFalse(Expression)

返回表达式的计算结果是否为 false。Returns whether the expression evaluates to false.

IsFalse(Expression, MethodInfo) IsFalse(Expression, MethodInfo) IsFalse(Expression, MethodInfo) IsFalse(Expression, MethodInfo)

返回表达式的计算结果是否为 false。Returns whether the expression evaluates to false.

IsTrue(Expression) IsTrue(Expression) IsTrue(Expression) IsTrue(Expression)

返回表达式的计算结果是否为 true。Returns whether the expression evaluates to true.

IsTrue(Expression, MethodInfo) IsTrue(Expression, MethodInfo) IsTrue(Expression, MethodInfo) IsTrue(Expression, MethodInfo)

返回表达式的计算结果是否为 true。Returns whether the expression evaluates to true.

Label() Label() Label() Label()

创建一个 LabelTarget,它表示具有 void 类型但没有名称的标签。Creates a LabelTarget representing a label with void type and no name.

Label(LabelTarget) Label(LabelTarget) Label(LabelTarget) Label(LabelTarget)

创建一个LabelExpression,它表示不带默认值的标签。Creates a LabelExpression representing a label without a default value.

Label(LabelTarget, Expression) Label(LabelTarget, Expression) Label(LabelTarget, Expression) Label(LabelTarget, Expression)

创建一个 LabelExpression,它表示具有给定默认值的标签。Creates a LabelExpression representing a label with the given default value.

Label(String) Label(String) Label(String) Label(String)

创建一个 LabelTarget,它表示具有 void 类型和给定名称的标签。Creates a LabelTarget representing a label with void type and the given name.

Label(Type) Label(Type) Label(Type) Label(Type)

创建一个 LabelTarget,它表示具有给定类型的标签。Creates a LabelTarget representing a label with the given type.

Label(Type, String) Label(Type, String) Label(Type, String) Label(Type, String)

创建一个 LabelTarget,它表示具有给定类型和名称的标签。Creates a LabelTarget representing a label with the given type and name.

Lambda(Expression, Boolean, IEnumerable<ParameterExpression>) Lambda(Expression, Boolean, IEnumerable<ParameterExpression>) Lambda(Expression, Boolean, IEnumerable<ParameterExpression>) Lambda(Expression, Boolean, IEnumerable<ParameterExpression>)

首先从表达式主体构造一个委托类型,一个表示是否将应用尾调用优化的参数以及一个参数表达式的可枚举集合,以便创建 LambdaExpressionCreates a LambdaExpression by first constructing a delegate type from the expression body, a parameter that indicates whether tail call optimization will be applied, and an enumerable collection of parameter expressions. 如果委托类型在编译时未知,则可以使用它。It can be used when the delegate type is not known at compile time.

Lambda(Expression, Boolean, ParameterExpression[]) Lambda(Expression, Boolean, ParameterExpression[]) Lambda(Expression, Boolean, ParameterExpression[]) Lambda(Expression, Boolean, ParameterExpression[])

首先从表达式主体构造一个委托类型,一个表示是否将应用尾调用优化的参数以及一个参数表达式的数组,以便创建 LambdaExpressionCreates a LambdaExpression by first constructing a delegate type from the expression body, a parameter that indicates whether tail call optimization will be applied, and an array of parameter expressions. 如果委托类型在编译时未知,则可以使用它。It can be used when the delegate type is not known at compile time.

Lambda(Expression, IEnumerable<ParameterExpression>) Lambda(Expression, IEnumerable<ParameterExpression>) Lambda(Expression, IEnumerable<ParameterExpression>) Lambda(Expression, IEnumerable<ParameterExpression>)

首先从表达式主体构造一个委托类型以及一个参数表达式的可枚举集合,以便创建 LambdaExpressionCreates a LambdaExpression by first constructing a delegate type from the expression body, and an enumerable collection of parameter expressions. 如果委托类型在编译时未知,则可以使用它。It can be used when the delegate type is not known at compile time.

Lambda(Expression, ParameterExpression[]) Lambda(Expression, ParameterExpression[]) Lambda(Expression, ParameterExpression[]) Lambda(Expression, ParameterExpression[])

首先从表达式主体构造一个委托类型以及一个参数表达式的数组,以便创建 LambdaExpressionCreates a LambdaExpression by first constructing a delegate type from the expression body, and an array of parameter expressions. 如果委托类型在编译时未知,则可以使用它。It can be used when the delegate type is not known at compile time.

Lambda(Expression, String, Boolean, IEnumerable<ParameterExpression>) Lambda(Expression, String, Boolean, IEnumerable<ParameterExpression>) Lambda(Expression, String, Boolean, IEnumerable<ParameterExpression>) Lambda(Expression, String, Boolean, IEnumerable<ParameterExpression>)

首先从表达式主体构造一个委托类型、lambda 的名称、一个表示是否将应用尾调用优化的参数,以及一个参数表达式的可枚举集合,以便创建 LambdaExpressionCreates a LambdaExpression by first constructing a delegate type from the expression body, the name for the lambda, a parameter that indicates whether tail call optimization will be applied, and an enumerable collection of parameter expressions. 如果委托类型在编译时未知,则可以使用它。It can be used when the delegate type is not known at compile time.

Lambda(Expression, String, IEnumerable<ParameterExpression>) Lambda(Expression, String, IEnumerable<ParameterExpression>) Lambda(Expression, String, IEnumerable<ParameterExpression>) Lambda(Expression, String, IEnumerable<ParameterExpression>)

首先从表达式主体构造一个委托类型、lambda 的名称和一个参数表达式的可枚举集合,以便创建 LambdaExpressionCreates a LambdaExpression by first constructing a delegate type from the expression body, the name for the lambda, and an enumerable collection of parameter expressions. 如果委托类型在编译时未知,则可以使用它。It can be used when the delegate type is not known at compile time.

Lambda(Type, Expression, Boolean, IEnumerable<ParameterExpression>) Lambda(Type, Expression, Boolean, IEnumerable<ParameterExpression>) Lambda(Type, Expression, Boolean, IEnumerable<ParameterExpression>) Lambda(Type, Expression, Boolean, IEnumerable<ParameterExpression>)

使用表示是否将应用尾调用优化的参数和一个参数表达式的可枚举集合,创建一个在编译时委托类型已知的 LambdaExpressionCreates a LambdaExpression where the delegate type is known at compile time, with a parameter that indicates whether tail call optimization will be applied, and an enumerable collection of parameter expressions.

Lambda(Type, Expression, Boolean, ParameterExpression[]) Lambda(Type, Expression, Boolean, ParameterExpression[]) Lambda(Type, Expression, Boolean, ParameterExpression[]) Lambda(Type, Expression, Boolean, ParameterExpression[])

使用表示是否将应用尾调用优化的参数和一个参数表达式的数组,创建一个在编译时委托类型已知的 LambdaExpressionCreates a LambdaExpression where the delegate type is known at compile time, with a parameter that indicates whether tail call optimization will be applied, and an array of parameter expressions.

Lambda(Type, Expression, IEnumerable<ParameterExpression>) Lambda(Type, Expression, IEnumerable<ParameterExpression>) Lambda(Type, Expression, IEnumerable<ParameterExpression>) Lambda(Type, Expression, IEnumerable<ParameterExpression>)

使用参数表达式的可枚举集合创建一个在编译时委托类型已知的 LambdaExpressionCreates a LambdaExpression where the delegate type is known at compile time, with an enumerable collection of parameter expressions.

Lambda(Type, Expression, ParameterExpression[]) Lambda(Type, Expression, ParameterExpression[]) Lambda(Type, Expression, ParameterExpression[]) Lambda(Type, Expression, ParameterExpression[])

使用参数表达式的数组创建一个在编译时委托类型已知的 LambdaExpressionCreates a LambdaExpression where the delegate type is known at compile time, with an array of parameter expressions.

Lambda(Type, Expression, String, Boolean, IEnumerable<ParameterExpression>) Lambda(Type, Expression, String, Boolean, IEnumerable<ParameterExpression>) Lambda(Type, Expression, String, Boolean, IEnumerable<ParameterExpression>) Lambda(Type, Expression, String, Boolean, IEnumerable<ParameterExpression>)

使用 lambda 的名称、表示是否将应用尾调用优化的参数和一个参数表达式的可枚举集合,创建一个在编译时委托类型已知的 LambdaExpressionCreates a LambdaExpression where the delegate type is known at compile time, with the name for the lambda, a parameter that indicates whether tail call optimization will be applied, and an enumerable collection of parameter expressions.

Lambda(Type, Expression, String, IEnumerable<ParameterExpression>) Lambda(Type, Expression, String, IEnumerable<ParameterExpression>) Lambda(Type, Expression, String, IEnumerable<ParameterExpression>) Lambda(Type, Expression, String, IEnumerable<ParameterExpression>)

使用 lambda 的名称和参数表达式的可枚举集合,创建一个在编译时委托类型已知的 LambdaExpressionCreates a LambdaExpression where the delegate type is known at compile time, with the name for the lambda, and an enumerable collection of parameter expressions.

Lambda<TDelegate>(Expression, Boolean, IEnumerable<ParameterExpression>) Lambda<TDelegate>(Expression, Boolean, IEnumerable<ParameterExpression>) Lambda<TDelegate>(Expression, Boolean, IEnumerable<ParameterExpression>) Lambda<TDelegate>(Expression, Boolean, IEnumerable<ParameterExpression>)

使用表示是否将应用尾调用优化的参数和一个参数表达式的可枚举集合,创建一个在编译时委托类型已知的 Expression<TDelegate>Creates an Expression<TDelegate> where the delegate type is known at compile time, with a parameter that indicates whether tail call optimization will be applied, and an enumerable collection of parameter expressions.

Lambda<TDelegate>(Expression, Boolean, ParameterExpression[]) Lambda<TDelegate>(Expression, Boolean, ParameterExpression[]) Lambda<TDelegate>(Expression, Boolean, ParameterExpression[]) Lambda<TDelegate>(Expression, Boolean, ParameterExpression[])

使用表示是否将应用尾调用优化的参数和一个参数表达式的数组,创建一个在编译时委托类型已知的 Expression<TDelegate>Creates an Expression<TDelegate> where the delegate type is known at compile time, with a parameter that indicates whether tail call optimization will be applied, and an array of parameter expressions.

Lambda<TDelegate>(Expression, IEnumerable<ParameterExpression>) Lambda<TDelegate>(Expression, IEnumerable<ParameterExpression>) Lambda<TDelegate>(Expression, IEnumerable<ParameterExpression>) Lambda<TDelegate>(Expression, IEnumerable<ParameterExpression>)

使用参数表达式的可枚举集合,创建一个在编译时委托类型已知的 Expression<TDelegate>Creates an Expression<TDelegate> where the delegate type is known at compile time, with an enumerable collection of parameter expressions.

Lambda<TDelegate>(Expression, ParameterExpression[]) Lambda<TDelegate>(Expression, ParameterExpression[]) Lambda<TDelegate>(Expression, ParameterExpression[]) Lambda<TDelegate>(Expression, ParameterExpression[])

使用参数表达式的数组创建一个在编译时委托类型已知的 Expression<TDelegate>Creates an Expression<TDelegate> where the delegate type is known at compile time, with an array of parameter expressions.

Lambda<TDelegate>(Expression, String, Boolean, IEnumerable<ParameterExpression>) Lambda<TDelegate>(Expression, String, Boolean, IEnumerable<ParameterExpression>) Lambda<TDelegate>(Expression, String, Boolean, IEnumerable<ParameterExpression>) Lambda<TDelegate>(Expression, String, Boolean, IEnumerable<ParameterExpression>)

使用 lambda 的名称、表示是否将应用尾调用优化的参数以及一个参数表达式的可枚举集合,创建一个在编译时委托类型已知的 Expression<TDelegate>Creates an Expression<TDelegate> where the delegate type is known at compile time, with the name for the lambda, a parameter that indicates whether tail call optimization will be applied, and an enumerable collection of parameter expressions.

Lambda<TDelegate>(Expression, String, IEnumerable<ParameterExpression>) Lambda<TDelegate>(Expression, String, IEnumerable<ParameterExpression>) Lambda<TDelegate>(Expression, String, IEnumerable<ParameterExpression>) Lambda<TDelegate>(Expression, String, IEnumerable<ParameterExpression>)

使用 lambda 的名称和一个参数表达式的可枚举集合,创建一个在编译时委托类型已知的 Expression<TDelegate>Creates an Expression<TDelegate> where the delegate type is known at compile time, with the name for the lambda, and an enumerable collection of parameter expressions.

LeftShift(Expression, Expression) LeftShift(Expression, Expression) LeftShift(Expression, Expression) LeftShift(Expression, Expression)

创建一个表示按位左移运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise left-shift operation.

LeftShift(Expression, Expression, MethodInfo) LeftShift(Expression, Expression, MethodInfo) LeftShift(Expression, Expression, MethodInfo) LeftShift(Expression, Expression, MethodInfo)

创建一个表示按位左移运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise left-shift operation.

LeftShiftAssign(Expression, Expression) LeftShiftAssign(Expression, Expression) LeftShiftAssign(Expression, Expression) LeftShiftAssign(Expression, Expression)

创建一个表示按位左移赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise left-shift assignment operation.

LeftShiftAssign(Expression, Expression, MethodInfo) LeftShiftAssign(Expression, Expression, MethodInfo) LeftShiftAssign(Expression, Expression, MethodInfo) LeftShiftAssign(Expression, Expression, MethodInfo)

创建一个表示按位左移赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise left-shift assignment operation.

LeftShiftAssign(Expression, Expression, MethodInfo, LambdaExpression) LeftShiftAssign(Expression, Expression, MethodInfo, LambdaExpression) LeftShiftAssign(Expression, Expression, MethodInfo, LambdaExpression) LeftShiftAssign(Expression, Expression, MethodInfo, LambdaExpression)

创建一个表示按位左移赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise left-shift assignment operation.

LessThan(Expression, Expression) LessThan(Expression, Expression) LessThan(Expression, Expression) LessThan(Expression, Expression)

创建一个表示“小于”数值比较的 BinaryExpressionCreates a BinaryExpression that represents a "less than" numeric comparison.

LessThan(Expression, Expression, Boolean, MethodInfo) LessThan(Expression, Expression, Boolean, MethodInfo) LessThan(Expression, Expression, Boolean, MethodInfo) LessThan(Expression, Expression, Boolean, MethodInfo)

创建一个表示“小于”数值比较的 BinaryExpressionCreates a BinaryExpression that represents a "less than" numeric comparison.

LessThanOrEqual(Expression, Expression) LessThanOrEqual(Expression, Expression) LessThanOrEqual(Expression, Expression) LessThanOrEqual(Expression, Expression)

创建一个表示“小于或等于”数值比较的 BinaryExpressionCreates a BinaryExpression that represents a " less than or equal" numeric comparison.

LessThanOrEqual(Expression, Expression, Boolean, MethodInfo) LessThanOrEqual(Expression, Expression, Boolean, MethodInfo) LessThanOrEqual(Expression, Expression, Boolean, MethodInfo) LessThanOrEqual(Expression, Expression, Boolean, MethodInfo)

创建一个表示“小于或等于”数值比较的 BinaryExpressionCreates a BinaryExpression that represents a "less than or equal" numeric comparison.

ListBind(MemberInfo, ElementInit[]) ListBind(MemberInfo, ElementInit[]) ListBind(MemberInfo, ElementInit[]) ListBind(MemberInfo, ElementInit[])

创建一个其成员为字段或属性的 MemberListBindingCreates a MemberListBinding where the member is a field or property.

ListBind(MemberInfo, IEnumerable<ElementInit>) ListBind(MemberInfo, IEnumerable<ElementInit>) ListBind(MemberInfo, IEnumerable<ElementInit>) ListBind(MemberInfo, IEnumerable<ElementInit>)

创建一个其成员为字段或属性的 MemberListBindingCreates a MemberListBinding where the member is a field or property.

ListBind(MethodInfo, ElementInit[]) ListBind(MethodInfo, ElementInit[]) ListBind(MethodInfo, ElementInit[]) ListBind(MethodInfo, ElementInit[])

基于指定的属性访问器方法创建一个 MemberListBinding 对象。Creates a MemberListBinding object based on a specified property accessor method.

ListBind(MethodInfo, IEnumerable<ElementInit>) ListBind(MethodInfo, IEnumerable<ElementInit>) ListBind(MethodInfo, IEnumerable<ElementInit>) ListBind(MethodInfo, IEnumerable<ElementInit>)

基于指定的属性访问器方法创建一个 MemberListBindingCreates a MemberListBinding based on a specified property accessor method.

ListInit(NewExpression, ElementInit[]) ListInit(NewExpression, ElementInit[]) ListInit(NewExpression, ElementInit[]) ListInit(NewExpression, ElementInit[])

创建一个使用指定 ListInitExpression 对象来初始化集合的 ElementInitCreates a ListInitExpression that uses specified ElementInit objects to initialize a collection.

ListInit(NewExpression, Expression[]) ListInit(NewExpression, Expression[]) ListInit(NewExpression, Expression[]) ListInit(NewExpression, Expression[])

创建一个使用名为“Add”的方法将元素添加到集合中的 ListInitExpressionCreates a ListInitExpression that uses a method named "Add" to add elements to a collection.

ListInit(NewExpression, IEnumerable<ElementInit>) ListInit(NewExpression, IEnumerable<ElementInit>) ListInit(NewExpression, IEnumerable<ElementInit>) ListInit(NewExpression, IEnumerable<ElementInit>)

创建一个使用指定 ListInitExpression 对象来初始化集合的 ElementInitCreates a ListInitExpression that uses specified ElementInit objects to initialize a collection.

ListInit(NewExpression, IEnumerable<Expression>) ListInit(NewExpression, IEnumerable<Expression>) ListInit(NewExpression, IEnumerable<Expression>) ListInit(NewExpression, IEnumerable<Expression>)

创建一个使用名为“Add”的方法将元素添加到集合中的 ListInitExpressionCreates a ListInitExpression that uses a method named "Add" to add elements to a collection.

ListInit(NewExpression, MethodInfo, Expression[]) ListInit(NewExpression, MethodInfo, Expression[]) ListInit(NewExpression, MethodInfo, Expression[]) ListInit(NewExpression, MethodInfo, Expression[])

创建一个使用指定方法将元素添加到集合中的 ListInitExpressionCreates a ListInitExpression that uses a specified method to add elements to a collection.

ListInit(NewExpression, MethodInfo, IEnumerable<Expression>) ListInit(NewExpression, MethodInfo, IEnumerable<Expression>) ListInit(NewExpression, MethodInfo, IEnumerable<Expression>) ListInit(NewExpression, MethodInfo, IEnumerable<Expression>)

创建一个使用指定方法将元素添加到集合中的 ListInitExpressionCreates a ListInitExpression that uses a specified method to add elements to a collection.

Loop(Expression) Loop(Expression) Loop(Expression) Loop(Expression)

创建具有给定主体的 LoopExpressionCreates a LoopExpression with the given body.

Loop(Expression, LabelTarget) Loop(Expression, LabelTarget) Loop(Expression, LabelTarget) Loop(Expression, LabelTarget)

创建具有给定主体和中断目标的 LoopExpressionCreates a LoopExpression with the given body and break target.

Loop(Expression, LabelTarget, LabelTarget) Loop(Expression, LabelTarget, LabelTarget) Loop(Expression, LabelTarget, LabelTarget) Loop(Expression, LabelTarget, LabelTarget)

创建具有给定主体的 LoopExpressionCreates a LoopExpression with the given body.

MakeBinary(ExpressionType, Expression, Expression) MakeBinary(ExpressionType, Expression, Expression) MakeBinary(ExpressionType, Expression, Expression) MakeBinary(ExpressionType, Expression, Expression)

在给定左操作数和右操作数的情况下,通过调用适当的工厂方法来创建一个 BinaryExpressionCreates a BinaryExpression, given the left and right operands, by calling an appropriate factory method.

MakeBinary(ExpressionType, Expression, Expression, Boolean, MethodInfo) MakeBinary(ExpressionType, Expression, Expression, Boolean, MethodInfo) MakeBinary(ExpressionType, Expression, Expression, Boolean, MethodInfo) MakeBinary(ExpressionType, Expression, Expression, Boolean, MethodInfo)

在给定左操作数、右操作数和实现方法的情况下,通过调用适当的工厂方法来创建一个 BinaryExpressionCreates a BinaryExpression, given the left operand, right operand and implementing method, by calling the appropriate factory method.

MakeBinary(ExpressionType, Expression, Expression, Boolean, MethodInfo, LambdaExpression) MakeBinary(ExpressionType, Expression, Expression, Boolean, MethodInfo, LambdaExpression) MakeBinary(ExpressionType, Expression, Expression, Boolean, MethodInfo, LambdaExpression) MakeBinary(ExpressionType, Expression, Expression, Boolean, MethodInfo, LambdaExpression)

在给定左操作数、右操作数、实现方法和类型转换函数的情况下,通过调用适当的工厂方法来创建一个 BinaryExpressionCreates a BinaryExpression, given the left operand, right operand, implementing method and type conversion function, by calling the appropriate factory method.

MakeCatchBlock(Type, ParameterExpression, Expression, Expression) MakeCatchBlock(Type, ParameterExpression, Expression, Expression) MakeCatchBlock(Type, ParameterExpression, Expression, Expression) MakeCatchBlock(Type, ParameterExpression, Expression, Expression)

创建一个表示具有指定元素的 catch 语句的 CatchBlockCreates a CatchBlock representing a catch statement with the specified elements.

MakeDynamic(Type, CallSiteBinder, Expression) MakeDynamic(Type, CallSiteBinder, Expression) MakeDynamic(Type, CallSiteBinder, Expression) MakeDynamic(Type, CallSiteBinder, Expression)

创建一个 DynamicExpression,它表示由提供的 CallSiteBinder 和一个参数绑定的动态操作。Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and one argument.

MakeDynamic(Type, CallSiteBinder, Expression, Expression) MakeDynamic(Type, CallSiteBinder, Expression, Expression) MakeDynamic(Type, CallSiteBinder, Expression, Expression) MakeDynamic(Type, CallSiteBinder, Expression, Expression)

创建一个 DynamicExpression,它表示由提供的 CallSiteBinder 和两个参数绑定的动态操作。Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and two arguments.

MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression) MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression) MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression) MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression)

创建一个 DynamicExpression,它表示由提供的 CallSiteBinder 和三个自变量绑定的动态操作。Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and three arguments.

MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression, Expression) MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression, Expression) MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression, Expression) MakeDynamic(Type, CallSiteBinder, Expression, Expression, Expression, Expression)

创建一个 DynamicExpression,它表示由提供的 CallSiteBinder 和四个自变量绑定的动态操作。Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder and four arguments.

MakeDynamic(Type, CallSiteBinder, Expression[]) MakeDynamic(Type, CallSiteBinder, Expression[]) MakeDynamic(Type, CallSiteBinder, Expression[]) MakeDynamic(Type, CallSiteBinder, Expression[])

创建一个 DynamicExpression,它表示由提供的 CallSiteBinder 绑定的动态操作。Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.

MakeDynamic(Type, CallSiteBinder, IEnumerable<Expression>) MakeDynamic(Type, CallSiteBinder, IEnumerable<Expression>) MakeDynamic(Type, CallSiteBinder, IEnumerable<Expression>) MakeDynamic(Type, CallSiteBinder, IEnumerable<Expression>)

创建一个 DynamicExpression,它表示由提供的 CallSiteBinder 绑定的动态操作。Creates a DynamicExpression that represents a dynamic operation bound by the provided CallSiteBinder.

MakeGoto(GotoExpressionKind, LabelTarget, Expression, Type) MakeGoto(GotoExpressionKind, LabelTarget, Expression, Type) MakeGoto(GotoExpressionKind, LabelTarget, Expression, Type) MakeGoto(GotoExpressionKind, LabelTarget, Expression, Type)

创建一个 GotoExpression,它表示指定的 GotoExpressionKind 的跳转。Creates a GotoExpression representing a jump of the specified GotoExpressionKind. 也可以指定在跳转时传递给标签的值。The value passed to the label upon jumping can also be specified.

MakeIndex(Expression, PropertyInfo, IEnumerable<Expression>) MakeIndex(Expression, PropertyInfo, IEnumerable<Expression>) MakeIndex(Expression, PropertyInfo, IEnumerable<Expression>) MakeIndex(Expression, PropertyInfo, IEnumerable<Expression>)

创建一个 IndexExpression,它表示访问对象中的索引属性。Creates an IndexExpression that represents accessing an indexed property in an object.

MakeMemberAccess(Expression, MemberInfo) MakeMemberAccess(Expression, MemberInfo) MakeMemberAccess(Expression, MemberInfo) MakeMemberAccess(Expression, MemberInfo)

创建一个表示访问字段或属性的 MemberExpressionCreates a MemberExpression that represents accessing either a field or a property.

MakeTry(Type, Expression, Expression, Expression, IEnumerable<CatchBlock>) MakeTry(Type, Expression, Expression, Expression, IEnumerable<CatchBlock>) MakeTry(Type, Expression, Expression, Expression, IEnumerable<CatchBlock>) MakeTry(Type, Expression, Expression, Expression, IEnumerable<CatchBlock>)

创建一个表示具有指定元素的 try 块的 TryExpressionCreates a TryExpression representing a try block with the specified elements.

MakeUnary(ExpressionType, Expression, Type) MakeUnary(ExpressionType, Expression, Type) MakeUnary(ExpressionType, Expression, Type) MakeUnary(ExpressionType, Expression, Type)

在给定操作数的情况下,通过调用适当的工厂方法来创建一个 UnaryExpressionCreates a UnaryExpression, given an operand, by calling the appropriate factory method.

MakeUnary(ExpressionType, Expression, Type, MethodInfo) MakeUnary(ExpressionType, Expression, Type, MethodInfo) MakeUnary(ExpressionType, Expression, Type, MethodInfo) MakeUnary(ExpressionType, Expression, Type, MethodInfo)

在给定操作数和实现方法的情况下,通过调用适当的工厂方法来创建一个 UnaryExpressionCreates a UnaryExpression, given an operand and implementing method, by calling the appropriate factory method.

MemberBind(MemberInfo, IEnumerable<MemberBinding>) MemberBind(MemberInfo, IEnumerable<MemberBinding>) MemberBind(MemberInfo, IEnumerable<MemberBinding>) MemberBind(MemberInfo, IEnumerable<MemberBinding>)

创建一个表示递归初始化某个字段或属性的成员的 MemberMemberBindingCreates a MemberMemberBinding that represents the recursive initialization of members of a field or property.

MemberBind(MemberInfo, MemberBinding[]) MemberBind(MemberInfo, MemberBinding[]) MemberBind(MemberInfo, MemberBinding[]) MemberBind(MemberInfo, MemberBinding[])

创建一个表示递归初始化某个字段或属性的成员的 MemberMemberBindingCreates a MemberMemberBinding that represents the recursive initialization of members of a field or property.

MemberBind(MethodInfo, IEnumerable<MemberBinding>) MemberBind(MethodInfo, IEnumerable<MemberBinding>) MemberBind(MethodInfo, IEnumerable<MemberBinding>) MemberBind(MethodInfo, IEnumerable<MemberBinding>)

使用属性访问器方法创建一个表示对所访问的成员的成员进行递归初始化的 MemberMemberBindingCreates a MemberMemberBinding that represents the recursive initialization of members of a member that is accessed by using a property accessor method.

MemberBind(MethodInfo, MemberBinding[]) MemberBind(MethodInfo, MemberBinding[]) MemberBind(MethodInfo, MemberBinding[]) MemberBind(MethodInfo, MemberBinding[])

使用属性访问器方法创建一个表示对所访问的成员的成员进行递归初始化的 MemberMemberBindingCreates a MemberMemberBinding that represents the recursive initialization of members of a member that is accessed by using a property accessor method.

MemberInit(NewExpression, IEnumerable<MemberBinding>) MemberInit(NewExpression, IEnumerable<MemberBinding>) MemberInit(NewExpression, IEnumerable<MemberBinding>) MemberInit(NewExpression, IEnumerable<MemberBinding>)

表示一个表达式,该表达式创建新对象并初始化该对象的一个属性。Represents an expression that creates a new object and initializes a property of the object.

MemberInit(NewExpression, MemberBinding[]) MemberInit(NewExpression, MemberBinding[]) MemberInit(NewExpression, MemberBinding[]) MemberInit(NewExpression, MemberBinding[])

创建一个 MemberInitExpressionCreates a MemberInitExpression.

MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

创建当前 Object 的浅表副本。Creates a shallow copy of the current Object.

(Inherited from Object)
Modulo(Expression, Expression) Modulo(Expression, Expression) Modulo(Expression, Expression) Modulo(Expression, Expression)

创建一个表示算术余数运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic remainder operation.

Modulo(Expression, Expression, MethodInfo) Modulo(Expression, Expression, MethodInfo) Modulo(Expression, Expression, MethodInfo) Modulo(Expression, Expression, MethodInfo)

创建一个表示算术余数运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic remainder operation.

ModuloAssign(Expression, Expression) ModuloAssign(Expression, Expression) ModuloAssign(Expression, Expression) ModuloAssign(Expression, Expression)

创建一个表示余数赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a remainder assignment operation.

ModuloAssign(Expression, Expression, MethodInfo) ModuloAssign(Expression, Expression, MethodInfo) ModuloAssign(Expression, Expression, MethodInfo) ModuloAssign(Expression, Expression, MethodInfo)

创建一个表示余数赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a remainder assignment operation.

ModuloAssign(Expression, Expression, MethodInfo, LambdaExpression) ModuloAssign(Expression, Expression, MethodInfo, LambdaExpression) ModuloAssign(Expression, Expression, MethodInfo, LambdaExpression) ModuloAssign(Expression, Expression, MethodInfo, LambdaExpression)

创建一个表示余数赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a remainder assignment operation.

Multiply(Expression, Expression) Multiply(Expression, Expression) Multiply(Expression, Expression) Multiply(Expression, Expression)

创建一个表示不进行溢出检查的算术乘法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic multiplication operation that does not have overflow checking.

Multiply(Expression, Expression, MethodInfo) Multiply(Expression, Expression, MethodInfo) Multiply(Expression, Expression, MethodInfo) Multiply(Expression, Expression, MethodInfo)

创建一个表示不进行溢出检查的算术乘法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic multiplication operation that does not have overflow checking.

MultiplyAssign(Expression, Expression) MultiplyAssign(Expression, Expression) MultiplyAssign(Expression, Expression) MultiplyAssign(Expression, Expression)

创建一个表示不进行溢出检查的乘法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.

MultiplyAssign(Expression, Expression, MethodInfo) MultiplyAssign(Expression, Expression, MethodInfo) MultiplyAssign(Expression, Expression, MethodInfo) MultiplyAssign(Expression, Expression, MethodInfo)

创建一个表示不进行溢出检查的乘法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.

MultiplyAssign(Expression, Expression, MethodInfo, LambdaExpression) MultiplyAssign(Expression, Expression, MethodInfo, LambdaExpression) MultiplyAssign(Expression, Expression, MethodInfo, LambdaExpression) MultiplyAssign(Expression, Expression, MethodInfo, LambdaExpression)

创建一个表示不进行溢出检查的乘法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a multiplication assignment operation that does not have overflow checking.

MultiplyAssignChecked(Expression, Expression) MultiplyAssignChecked(Expression, Expression) MultiplyAssignChecked(Expression, Expression) MultiplyAssignChecked(Expression, Expression)

创建一个表示进行溢出检查的乘法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.

MultiplyAssignChecked(Expression, Expression, MethodInfo) MultiplyAssignChecked(Expression, Expression, MethodInfo) MultiplyAssignChecked(Expression, Expression, MethodInfo) MultiplyAssignChecked(Expression, Expression, MethodInfo)

创建一个表示进行溢出检查的乘法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.

MultiplyAssignChecked(Expression, Expression, MethodInfo, LambdaExpression) MultiplyAssignChecked(Expression, Expression, MethodInfo, LambdaExpression) MultiplyAssignChecked(Expression, Expression, MethodInfo, LambdaExpression) MultiplyAssignChecked(Expression, Expression, MethodInfo, LambdaExpression)

创建一个表示进行溢出检查的乘法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a multiplication assignment operation that has overflow checking.

MultiplyChecked(Expression, Expression) MultiplyChecked(Expression, Expression) MultiplyChecked(Expression, Expression) MultiplyChecked(Expression, Expression)

创建一个表示进行溢出检查的算术乘法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic multiplication operation that has overflow checking.

MultiplyChecked(Expression, Expression, MethodInfo) MultiplyChecked(Expression, Expression, MethodInfo) MultiplyChecked(Expression, Expression, MethodInfo) MultiplyChecked(Expression, Expression, MethodInfo)

创建一个表示进行溢出检查的算术乘法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic multiplication operation that has overflow checking.

Negate(Expression) Negate(Expression) Negate(Expression) Negate(Expression)

创建一个表示算术求反运算的 UnaryExpressionCreates a UnaryExpression that represents an arithmetic negation operation.

Negate(Expression, MethodInfo) Negate(Expression, MethodInfo) Negate(Expression, MethodInfo) Negate(Expression, MethodInfo)

创建一个表示算术求反运算的 UnaryExpressionCreates a UnaryExpression that represents an arithmetic negation operation.

NegateChecked(Expression) NegateChecked(Expression) NegateChecked(Expression) NegateChecked(Expression)

创建一个表示进行溢出检查的算术求反运算的 UnaryExpressionCreates a UnaryExpression that represents an arithmetic negation operation that has overflow checking.

NegateChecked(Expression, MethodInfo) NegateChecked(Expression, MethodInfo) NegateChecked(Expression, MethodInfo) NegateChecked(Expression, MethodInfo)

创建一个表示进行溢出检查的算术求反运算的 UnaryExpressionCreates a UnaryExpression that represents an arithmetic negation operation that has overflow checking. 可指定实现方法。The implementing method can be specified.

New(ConstructorInfo) New(ConstructorInfo) New(ConstructorInfo) New(ConstructorInfo)

创建一个表示调用不带参数的指定构造函数的 NewExpressionCreates a NewExpression that represents calling the specified constructor that takes no arguments.

New(ConstructorInfo, Expression[]) New(ConstructorInfo, Expression[]) New(ConstructorInfo, Expression[]) New(ConstructorInfo, Expression[])

创建一个表示调用带指定参数的指定构造函数的 NewExpressionCreates a NewExpression that represents calling the specified constructor with the specified arguments.

New(ConstructorInfo, IEnumerable<Expression>) New(ConstructorInfo, IEnumerable<Expression>) New(ConstructorInfo, IEnumerable<Expression>) New(ConstructorInfo, IEnumerable<Expression>)

创建一个表示调用带指定参数的指定构造函数的 NewExpressionCreates a NewExpression that represents calling the specified constructor with the specified arguments.

New(ConstructorInfo, IEnumerable<Expression>, IEnumerable<MemberInfo>) New(ConstructorInfo, IEnumerable<Expression>, IEnumerable<MemberInfo>) New(ConstructorInfo, IEnumerable<Expression>, IEnumerable<MemberInfo>) New(ConstructorInfo, IEnumerable<Expression>, IEnumerable<MemberInfo>)

创建一个表示调用带指定参数的指定构造函数的 NewExpressionCreates a NewExpression that represents calling the specified constructor with the specified arguments. 其中指定了访问构造函数初始化的字段的成员。The members that access the constructor initialized fields are specified.

New(ConstructorInfo, IEnumerable<Expression>, MemberInfo[]) New(ConstructorInfo, IEnumerable<Expression>, MemberInfo[]) New(ConstructorInfo, IEnumerable<Expression>, MemberInfo[]) New(ConstructorInfo, IEnumerable<Expression>, MemberInfo[])

创建一个表示调用带指定参数的指定构造函数的 NewExpressionCreates a NewExpression that represents calling the specified constructor with the specified arguments. 将访问构造函数初始化字段的成员指定为数组。The members that access the constructor initialized fields are specified as an array.

New(Type) New(Type) New(Type) New(Type)

创建一个表示调用指定类型的无参数构造函数的 NewExpressionCreates a NewExpression that represents calling the parameterless constructor of the specified type.

NewArrayBounds(Type, Expression[]) NewArrayBounds(Type, Expression[]) NewArrayBounds(Type, Expression[]) NewArrayBounds(Type, Expression[])

创建一个表示创建具有指定秩的数组的 NewArrayExpressionCreates a NewArrayExpression that represents creating an array that has a specified rank.

NewArrayBounds(Type, IEnumerable<Expression>) NewArrayBounds(Type, IEnumerable<Expression>) NewArrayBounds(Type, IEnumerable<Expression>) NewArrayBounds(Type, IEnumerable<Expression>)

创建一个表示创建具有指定秩的数组的 NewArrayExpressionCreates a NewArrayExpression that represents creating an array that has a specified rank.

NewArrayInit(Type, Expression[]) NewArrayInit(Type, Expression[]) NewArrayInit(Type, Expression[]) NewArrayInit(Type, Expression[])

创建一个表示创建一维数组并使用元素列表初始化该数组的 NewArrayExpressionCreates a NewArrayExpression that represents creating a one-dimensional array and initializing it from a list of elements.

NewArrayInit(Type, IEnumerable<Expression>) NewArrayInit(Type, IEnumerable<Expression>) NewArrayInit(Type, IEnumerable<Expression>) NewArrayInit(Type, IEnumerable<Expression>)

创建一个表示创建一维数组并使用元素列表初始化该数组的 NewArrayExpressionCreates a NewArrayExpression that represents creating a one-dimensional array and initializing it from a list of elements.

Not(Expression) Not(Expression) Not(Expression) Not(Expression)

创建一个表示按位求补运算的 UnaryExpressionCreates a UnaryExpression that represents a bitwise complement operation.

Not(Expression, MethodInfo) Not(Expression, MethodInfo) Not(Expression, MethodInfo) Not(Expression, MethodInfo)

创建一个表示按位求补运算的 UnaryExpressionCreates a UnaryExpression that represents a bitwise complement operation. 可指定实现方法。The implementing method can be specified.

NotEqual(Expression, Expression) NotEqual(Expression, Expression) NotEqual(Expression, Expression) NotEqual(Expression, Expression)

创建一个表示不相等比较的 BinaryExpressionCreates a BinaryExpression that represents an inequality comparison.

NotEqual(Expression, Expression, Boolean, MethodInfo) NotEqual(Expression, Expression, Boolean, MethodInfo) NotEqual(Expression, Expression, Boolean, MethodInfo) NotEqual(Expression, Expression, Boolean, MethodInfo)

创建一个表示不相等比较的 BinaryExpressionCreates a BinaryExpression that represents an inequality comparison.

OnesComplement(Expression) OnesComplement(Expression) OnesComplement(Expression) OnesComplement(Expression)

返回表示一的补数的表达式。Returns the expression representing the ones complement.

OnesComplement(Expression, MethodInfo) OnesComplement(Expression, MethodInfo) OnesComplement(Expression, MethodInfo) OnesComplement(Expression, MethodInfo)

返回表示一的补数的表达式。Returns the expression representing the ones complement.

Or(Expression, Expression) Or(Expression, Expression) Or(Expression, Expression) Or(Expression, Expression)

创建一个表示按位 BinaryExpression 运算的 ORCreates a BinaryExpression that represents a bitwise OR operation.

Or(Expression, Expression, MethodInfo) Or(Expression, Expression, MethodInfo) Or(Expression, Expression, MethodInfo) Or(Expression, Expression, MethodInfo)

创建一个表示按位 BinaryExpression 运算的 ORCreates a BinaryExpression that represents a bitwise OR operation.

OrAssign(Expression, Expression) OrAssign(Expression, Expression) OrAssign(Expression, Expression) OrAssign(Expression, Expression)

创建一个表示按位 OR 赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise OR assignment operation.

OrAssign(Expression, Expression, MethodInfo) OrAssign(Expression, Expression, MethodInfo) OrAssign(Expression, Expression, MethodInfo) OrAssign(Expression, Expression, MethodInfo)

创建一个表示按位 OR 赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise OR assignment operation.

OrAssign(Expression, Expression, MethodInfo, LambdaExpression) OrAssign(Expression, Expression, MethodInfo, LambdaExpression) OrAssign(Expression, Expression, MethodInfo, LambdaExpression) OrAssign(Expression, Expression, MethodInfo, LambdaExpression)

创建一个表示按位 OR 赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise OR assignment operation.

OrElse(Expression, Expression) OrElse(Expression, Expression) OrElse(Expression, Expression) OrElse(Expression, Expression)

创建一个 BinaryExpression,它表示仅在第一个操作数的计算结果为 OR 时才计算第二个操作数的条件 false 运算。Creates a BinaryExpression that represents a conditional OR operation that evaluates the second operand only if the first operand evaluates to false.

OrElse(Expression, Expression, MethodInfo) OrElse(Expression, Expression, MethodInfo) OrElse(Expression, Expression, MethodInfo) OrElse(Expression, Expression, MethodInfo)

创建一个 BinaryExpression,它表示仅在第一个操作数的计算结果为 OR 时才计算第二个操作数的条件 false 运算。Creates a BinaryExpression that represents a conditional OR operation that evaluates the second operand only if the first operand evaluates to false.

Parameter(Type) Parameter(Type) Parameter(Type) Parameter(Type)

创建一个 ParameterExpression 节点,该节点可用于标识表达式树中的参数或变量。Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.

Parameter(Type, String) Parameter(Type, String) Parameter(Type, String) Parameter(Type, String)

创建一个 ParameterExpression 节点,该节点可用于标识表达式树中的参数或变量。Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.

PostDecrementAssign(Expression) PostDecrementAssign(Expression) PostDecrementAssign(Expression) PostDecrementAssign(Expression)

创建一个 UnaryExpression,它表示将原始表达式递减 1 之后再进行表达式赋值。Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent decrement by 1 of the original expression.

PostDecrementAssign(Expression, MethodInfo) PostDecrementAssign(Expression, MethodInfo) PostDecrementAssign(Expression, MethodInfo) PostDecrementAssign(Expression, MethodInfo)

创建一个 UnaryExpression,它表示将原始表达式递减 1 之后再进行表达式赋值。Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent decrement by 1 of the original expression.

PostIncrementAssign(Expression) PostIncrementAssign(Expression) PostIncrementAssign(Expression) PostIncrementAssign(Expression)

创建一个 UnaryExpression,它表示将原始表达式递增 1 之后再进行表达式赋值。Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent increment by 1 of the original expression.

PostIncrementAssign(Expression, MethodInfo) PostIncrementAssign(Expression, MethodInfo) PostIncrementAssign(Expression, MethodInfo) PostIncrementAssign(Expression, MethodInfo)

创建一个 UnaryExpression,它表示将原始表达式递增 1 之后再进行表达式赋值。Creates a UnaryExpression that represents the assignment of the expression followed by a subsequent increment by 1 of the original expression.

Power(Expression, Expression) Power(Expression, Expression) Power(Expression, Expression) Power(Expression, Expression)

创建一个表示对数进行幂运算的 BinaryExpressionCreates a BinaryExpression that represents raising a number to a power.

Power(Expression, Expression, MethodInfo) Power(Expression, Expression, MethodInfo) Power(Expression, Expression, MethodInfo) Power(Expression, Expression, MethodInfo)

创建一个表示对数进行幂运算的 BinaryExpressionCreates a BinaryExpression that represents raising a number to a power.

PowerAssign(Expression, Expression) PowerAssign(Expression, Expression) PowerAssign(Expression, Expression) PowerAssign(Expression, Expression)

创建一个 BinaryExpression,它表示对表达式求幂并将结果赋回给表达式。Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.

PowerAssign(Expression, Expression, MethodInfo) PowerAssign(Expression, Expression, MethodInfo) PowerAssign(Expression, Expression, MethodInfo) PowerAssign(Expression, Expression, MethodInfo)

创建一个 BinaryExpression,它表示对表达式求幂并将结果赋回给表达式。Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.

PowerAssign(Expression, Expression, MethodInfo, LambdaExpression) PowerAssign(Expression, Expression, MethodInfo, LambdaExpression) PowerAssign(Expression, Expression, MethodInfo, LambdaExpression) PowerAssign(Expression, Expression, MethodInfo, LambdaExpression)

创建一个 BinaryExpression,它表示对表达式求幂并将结果赋回给表达式。Creates a BinaryExpression that represents raising an expression to a power and assigning the result back to the expression.

PreDecrementAssign(Expression) PreDecrementAssign(Expression) PreDecrementAssign(Expression) PreDecrementAssign(Expression)

创建一个 UnaryExpression,它将表达式递减 1 并将结果赋回给表达式。Creates a UnaryExpression that decrements the expression by 1 and assigns the result back to the expression.

PreDecrementAssign(Expression, MethodInfo) PreDecrementAssign(Expression, MethodInfo) PreDecrementAssign(Expression, MethodInfo) PreDecrementAssign(Expression, MethodInfo)

创建一个 UnaryExpression,它将表达式递减 1 并将结果赋回给表达式。Creates a UnaryExpression that decrements the expression by 1 and assigns the result back to the expression.

PreIncrementAssign(Expression) PreIncrementAssign(Expression) PreIncrementAssign(Expression) PreIncrementAssign(Expression)

创建一个 UnaryExpression,它将表达式递增 1 并将结果赋回给表达式。Creates a UnaryExpression that increments the expression by 1 and assigns the result back to the expression.

PreIncrementAssign(Expression, MethodInfo) PreIncrementAssign(Expression, MethodInfo) PreIncrementAssign(Expression, MethodInfo) PreIncrementAssign(Expression, MethodInfo)

创建一个 UnaryExpression,它将表达式递增 1 并将结果赋回给表达式。Creates a UnaryExpression that increments the expression by 1 and assigns the result back to the expression.

Property(Expression, MethodInfo) Property(Expression, MethodInfo) Property(Expression, MethodInfo) Property(Expression, MethodInfo)

使用属性访问器方法创建一个表示访问属性的 MemberExpressionCreates a MemberExpression that represents accessing a property by using a property accessor method.

Property(Expression, PropertyInfo) Property(Expression, PropertyInfo) Property(Expression, PropertyInfo) Property(Expression, PropertyInfo)

创建一个表示访问属性的 MemberExpressionCreates a MemberExpression that represents accessing a property.

Property(Expression, PropertyInfo, Expression[]) Property(Expression, PropertyInfo, Expression[]) Property(Expression, PropertyInfo, Expression[]) Property(Expression, PropertyInfo, Expression[])

创建一个 IndexExpression,它表示对索引属性的访问。Creates an IndexExpression representing the access to an indexed property.

Property(Expression, PropertyInfo, IEnumerable<Expression>) Property(Expression, PropertyInfo, IEnumerable<Expression>) Property(Expression, PropertyInfo, IEnumerable<Expression>) Property(Expression, PropertyInfo, IEnumerable<Expression>)

创建一个 IndexExpression,它表示对索引属性的访问。Creates an IndexExpression representing the access to an indexed property.

Property(Expression, String) Property(Expression, String) Property(Expression, String) Property(Expression, String)

创建一个表示访问属性的 MemberExpressionCreates a MemberExpression that represents accessing a property.

Property(Expression, String, Expression[]) Property(Expression, String, Expression[]) Property(Expression, String, Expression[]) Property(Expression, String, Expression[])

创建一个 IndexExpression,它表示对索引属性的访问。Creates an IndexExpression representing the access to an indexed property.

Property(Expression, Type, String) Property(Expression, Type, String) Property(Expression, Type, String) Property(Expression, Type, String)

创建一个访问属性的 MemberExpressionCreates a MemberExpression accessing a property.

PropertyOrField(Expression, String) PropertyOrField(Expression, String) PropertyOrField(Expression, String) PropertyOrField(Expression, String)

创建一个表示访问属性或字段的 MemberExpressionCreates a MemberExpression that represents accessing a property or field.

Quote(Expression) Quote(Expression) Quote(Expression) Quote(Expression)

创建一个表示具有类型 UnaryExpression 的常量值的表达式的 ExpressionCreates a UnaryExpression that represents an expression that has a constant value of type Expression.

Reduce() Reduce() Reduce() Reduce()

将此节点简化为更简单的表达式。Reduces this node to a simpler expression. 如果 CanReduce 返回 true,则它应返回有效的表达式。If CanReduce returns true, this should return a valid expression. 此方法可以返回本身必须简化的另一个节点。This method can return another node which itself must be reduced.

ReduceAndCheck() ReduceAndCheck() ReduceAndCheck() ReduceAndCheck()

将此节点简化为更简单的表达式。Reduces this node to a simpler expression. 如果 CanReduce 返回 true,则它应返回有效的表达式。If CanReduce returns true, this should return a valid expression. 此方法可以返回本身必须简化的另一个节点。This method can return another node which itself must be reduced.

ReduceExtensions() ReduceExtensions() ReduceExtensions() ReduceExtensions()

将表达式简化为已知节点类型(即非 Extension 节点)或仅在此类型为已知类型时返回表达式。Reduces the expression to a known node type (that is not an Extension node) or just returns the expression if it is already a known type.

ReferenceEqual(Expression, Expression) ReferenceEqual(Expression, Expression) ReferenceEqual(Expression, Expression) ReferenceEqual(Expression, Expression)

创建一个表示引用相等比较的 BinaryExpressionCreates a BinaryExpression that represents a reference equality comparison.

ReferenceNotEqual(Expression, Expression) ReferenceNotEqual(Expression, Expression) ReferenceNotEqual(Expression, Expression) ReferenceNotEqual(Expression, Expression)

创建一个表示引用不相等比较的 BinaryExpressionCreates a BinaryExpression that represents a reference inequality comparison.

Rethrow() Rethrow() Rethrow() Rethrow()

创建一个 UnaryExpression,它表示重新引发异常。Creates a UnaryExpression that represents a rethrowing of an exception.

Rethrow(Type) Rethrow(Type) Rethrow(Type) Rethrow(Type)

创建一个 UnaryExpression,它表示重新引发具有给定类型的异常。Creates a UnaryExpression that represents a rethrowing of an exception with a given type.

Return(LabelTarget) Return(LabelTarget) Return(LabelTarget) Return(LabelTarget)

创建一个表示 return 语句的 GotoExpressionCreates a GotoExpression representing a return statement.

Return(LabelTarget, Expression) Return(LabelTarget, Expression) Return(LabelTarget, Expression) Return(LabelTarget, Expression)

创建一个表示 return 语句的 GotoExpressionCreates a GotoExpression representing a return statement. 可以指定在跳转时传递给标签的值。The value passed to the label upon jumping can be specified.

Return(LabelTarget, Expression, Type) Return(LabelTarget, Expression, Type) Return(LabelTarget, Expression, Type) Return(LabelTarget, Expression, Type)

创建一个表示具有指定类型的 return 语句的 GotoExpressionCreates a GotoExpression representing a return statement with the specified type. 可以指定在跳转时传递给标签的值。The value passed to the label upon jumping can be specified.

Return(LabelTarget, Type) Return(LabelTarget, Type) Return(LabelTarget, Type) Return(LabelTarget, Type)

创建一个表示具有指定类型的 return 语句的 GotoExpressionCreates a GotoExpression representing a return statement with the specified type.

RightShift(Expression, Expression) RightShift(Expression, Expression) RightShift(Expression, Expression) RightShift(Expression, Expression)

创建一个表示按位右移运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise right-shift operation.

RightShift(Expression, Expression, MethodInfo) RightShift(Expression, Expression, MethodInfo) RightShift(Expression, Expression, MethodInfo) RightShift(Expression, Expression, MethodInfo)

创建一个表示按位右移运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise right-shift operation.

RightShiftAssign(Expression, Expression) RightShiftAssign(Expression, Expression) RightShiftAssign(Expression, Expression) RightShiftAssign(Expression, Expression)

创建一个表示按位右移赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise right-shift assignment operation.

RightShiftAssign(Expression, Expression, MethodInfo) RightShiftAssign(Expression, Expression, MethodInfo) RightShiftAssign(Expression, Expression, MethodInfo) RightShiftAssign(Expression, Expression, MethodInfo)

创建一个表示按位右移赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise right-shift assignment operation.

RightShiftAssign(Expression, Expression, MethodInfo, LambdaExpression) RightShiftAssign(Expression, Expression, MethodInfo, LambdaExpression) RightShiftAssign(Expression, Expression, MethodInfo, LambdaExpression) RightShiftAssign(Expression, Expression, MethodInfo, LambdaExpression)

创建一个表示按位右移赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a bitwise right-shift assignment operation.

RuntimeVariables(IEnumerable<ParameterExpression>) RuntimeVariables(IEnumerable<ParameterExpression>) RuntimeVariables(IEnumerable<ParameterExpression>) RuntimeVariables(IEnumerable<ParameterExpression>)

创建 RuntimeVariablesExpression 的实例。Creates an instance of RuntimeVariablesExpression.

RuntimeVariables(ParameterExpression[]) RuntimeVariables(ParameterExpression[]) RuntimeVariables(ParameterExpression[]) RuntimeVariables(ParameterExpression[])

创建 RuntimeVariablesExpression 的实例。Creates an instance of RuntimeVariablesExpression.

Subtract(Expression, Expression) Subtract(Expression, Expression) Subtract(Expression, Expression) Subtract(Expression, Expression)

创建一个表示不进行溢出检查的算术减法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic subtraction operation that does not have overflow checking.

Subtract(Expression, Expression, MethodInfo) Subtract(Expression, Expression, MethodInfo) Subtract(Expression, Expression, MethodInfo) Subtract(Expression, Expression, MethodInfo)

创建一个表示不进行溢出检查的算术减法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic subtraction operation that does not have overflow checking.

SubtractAssign(Expression, Expression) SubtractAssign(Expression, Expression) SubtractAssign(Expression, Expression) SubtractAssign(Expression, Expression)

创建一个表示不进行溢出检查的减法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.

SubtractAssign(Expression, Expression, MethodInfo) SubtractAssign(Expression, Expression, MethodInfo) SubtractAssign(Expression, Expression, MethodInfo) SubtractAssign(Expression, Expression, MethodInfo)

创建一个表示不进行溢出检查的减法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.

SubtractAssign(Expression, Expression, MethodInfo, LambdaExpression) SubtractAssign(Expression, Expression, MethodInfo, LambdaExpression) SubtractAssign(Expression, Expression, MethodInfo, LambdaExpression) SubtractAssign(Expression, Expression, MethodInfo, LambdaExpression)

创建一个表示不进行溢出检查的减法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a subtraction assignment operation that does not have overflow checking.

SubtractAssignChecked(Expression, Expression) SubtractAssignChecked(Expression, Expression) SubtractAssignChecked(Expression, Expression) SubtractAssignChecked(Expression, Expression)

创建一个表示进行溢出检查的减法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.

SubtractAssignChecked(Expression, Expression, MethodInfo) SubtractAssignChecked(Expression, Expression, MethodInfo) SubtractAssignChecked(Expression, Expression, MethodInfo) SubtractAssignChecked(Expression, Expression, MethodInfo)

创建一个表示进行溢出检查的减法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.

SubtractAssignChecked(Expression, Expression, MethodInfo, LambdaExpression) SubtractAssignChecked(Expression, Expression, MethodInfo, LambdaExpression) SubtractAssignChecked(Expression, Expression, MethodInfo, LambdaExpression) SubtractAssignChecked(Expression, Expression, MethodInfo, LambdaExpression)

创建一个表示进行溢出检查的减法赋值运算的 BinaryExpressionCreates a BinaryExpression that represents a subtraction assignment operation that has overflow checking.

SubtractChecked(Expression, Expression) SubtractChecked(Expression, Expression) SubtractChecked(Expression, Expression) SubtractChecked(Expression, Expression)

创建一个表示进行溢出检查的算术减法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic subtraction operation that has overflow checking.

SubtractChecked(Expression, Expression, MethodInfo) SubtractChecked(Expression, Expression, MethodInfo) SubtractChecked(Expression, Expression, MethodInfo) SubtractChecked(Expression, Expression, MethodInfo)

创建一个表示进行溢出检查的算术减法运算的 BinaryExpressionCreates a BinaryExpression that represents an arithmetic subtraction operation that has overflow checking.

Switch(Expression, Expression, MethodInfo, IEnumerable<SwitchCase>) Switch(Expression, Expression, MethodInfo, IEnumerable<SwitchCase>) Switch(Expression, Expression, MethodInfo, IEnumerable<SwitchCase>) Switch(Expression, Expression, MethodInfo, IEnumerable<SwitchCase>)

创建一个表示具有默认分支的 SwitchExpression 语句的 switchCreates a SwitchExpression that represents a switch statement that has a default case.

Switch(Expression, Expression, MethodInfo, SwitchCase[]) Switch(Expression, Expression, MethodInfo, SwitchCase[]) Switch(Expression, Expression, MethodInfo, SwitchCase[]) Switch(Expression, Expression, MethodInfo, SwitchCase[])

创建一个表示具有默认分支的 SwitchExpression 语句的 switchCreates a SwitchExpression that represents a switch statement that has a default case.

Switch(Expression, Expression, SwitchCase[]) Switch(Expression, Expression, SwitchCase[]) Switch(Expression, Expression, SwitchCase[]) Switch(Expression, Expression, SwitchCase[])

创建一个表示具有默认分支的 SwitchExpression 语句的 switchCreates a SwitchExpression that represents a switch statement that has a default case.

Switch(Expression, SwitchCase[]) Switch(Expression, SwitchCase[]) Switch(Expression, SwitchCase[]) Switch(Expression, SwitchCase[])

创建一个表示不带默认分支的 SwitchExpression 语句的 switchCreates a SwitchExpression that represents a switch statement without a default case.

Switch(Type, Expression, Expression, MethodInfo, IEnumerable<SwitchCase>) Switch(Type, Expression, Expression, MethodInfo, IEnumerable<SwitchCase>) Switch(Type, Expression, Expression, MethodInfo, IEnumerable<SwitchCase>) Switch(Type, Expression, Expression, MethodInfo, IEnumerable<SwitchCase>)

创建一个表示具有默认分支的 SwitchExpression 语句的 switchCreates a SwitchExpression that represents a switch statement that has a default case.

Switch(Type, Expression, Expression, MethodInfo, SwitchCase[]) Switch(Type, Expression, Expression, MethodInfo, SwitchCase[]) Switch(Type, Expression, Expression, MethodInfo, SwitchCase[]) Switch(Type, Expression, Expression, MethodInfo, SwitchCase[])

创建一个表示具有默认分支的 SwitchExpression 语句的 switchCreates a SwitchExpression that represents a switch statement that has a default case.

SwitchCase(Expression, Expression[]) SwitchCase(Expression, Expression[]) SwitchCase(Expression, Expression[]) SwitchCase(Expression, Expression[])

创建在 SwitchCase 中使用的 SwitchExpressionCreates a SwitchCase for use in a SwitchExpression.

SwitchCase(Expression, IEnumerable<Expression>) SwitchCase(Expression, IEnumerable<Expression>) SwitchCase(Expression, IEnumerable<Expression>) SwitchCase(Expression, IEnumerable<Expression>)

创建要在 SwitchCase 对象中使用的 SwitchExpression 对象。Creates a SwitchCase object to be used in a SwitchExpression object.

SymbolDocument(String) SymbolDocument(String) SymbolDocument(String) SymbolDocument(String)

创建 SymbolDocumentInfo 的实例。Creates an instance of SymbolDocumentInfo.

SymbolDocument(String, Guid) SymbolDocument(String, Guid) SymbolDocument(String, Guid) SymbolDocument(String, Guid)

创建 SymbolDocumentInfo 的实例。Creates an instance of SymbolDocumentInfo.

SymbolDocument(String, Guid, Guid) SymbolDocument(String, Guid, Guid) SymbolDocument(String, Guid, Guid) SymbolDocument(String, Guid, Guid)

创建 SymbolDocumentInfo 的实例。Creates an instance of SymbolDocumentInfo.

SymbolDocument(String, Guid, Guid, Guid) SymbolDocument(String, Guid, Guid, Guid) SymbolDocument(String, Guid, Guid, Guid) SymbolDocument(String, Guid, Guid, Guid)

创建 SymbolDocumentInfo 的实例。Creates an instance of SymbolDocumentInfo.

Throw(Expression) Throw(Expression) Throw(Expression) Throw(Expression)

创建一个 UnaryExpression,它表示引发异常。Creates a UnaryExpression that represents a throwing of an exception.

Throw(Expression, Type) Throw(Expression, Type) Throw(Expression, Type) Throw(Expression, Type)

创建一个 UnaryExpression,它表示引发具有给定类型的异常。Creates a UnaryExpression that represents a throwing of an exception with a given type.

ToString() ToString() ToString() ToString()

返回 Expression 的的文本化表示形式。Returns a textual representation of the Expression.

TryCatch(Expression, CatchBlock[]) TryCatch(Expression, CatchBlock[]) TryCatch(Expression, CatchBlock[]) TryCatch(Expression, CatchBlock[])

创建一个表示 try 块的 TryExpression,该 try 块包含任意数量的 catch 语句,但不包含 fault 和 finally 块。Creates a TryExpression representing a try block with any number of catch statements and neither a fault nor finally block.

TryCatchFinally(Expression, Expression, CatchBlock[]) TryCatchFinally(Expression, Expression, CatchBlock[]) TryCatchFinally(Expression, Expression, CatchBlock[]) TryCatchFinally(Expression, Expression, CatchBlock[])

创建一个表示 try 块的 TryExpression,该 try 块包含任意数量的 catch 语句和一个 finally 块。Creates a TryExpression representing a try block with any number of catch statements and a finally block.

TryFault(Expression, Expression) TryFault(Expression, Expression) TryFault(Expression, Expression) TryFault(Expression, Expression)

创建一个表示 try 块的 TryExpression,该 try 块包含一个 fault 块,但不包含 catch 语句。Creates a TryExpression representing a try block with a fault block and no catch statements.

TryFinally(Expression, Expression) TryFinally(Expression, Expression) TryFinally(Expression, Expression) TryFinally(Expression, Expression)

创建一个表示 try 块的 TryExpression,该 try 块包含一个 finally 块,但不包含 catch 语句。Creates a TryExpression representing a try block with a finally block and no catch statements.

TryGetActionType(Type[], Type) TryGetActionType(Type[], Type) TryGetActionType(Type[], Type) TryGetActionType(Type[], Type)

创建一个 Type 对象,它表示具有特定类型参数的泛型 System.Action 委托类型。Creates a Type object that represents a generic System.Action delegate type that has specific type arguments.

TryGetFuncType(Type[], Type) TryGetFuncType(Type[], Type) TryGetFuncType(Type[], Type) TryGetFuncType(Type[], Type)

创建一个 Type 对象,它表示具有特定类型参数的泛型 System.Func 委托类型。Creates a Type object that represents a generic System.Func delegate type that has specific type arguments. 最后一个类型参数指定已创建委托的返回类型。The last type argument specifies the return type of the created delegate.

TypeAs(Expression, Type) TypeAs(Expression, Type) TypeAs(Expression, Type) TypeAs(Expression, Type)

创建一个表示显式引用或装箱转换的 UnaryExpression(如果转换失败,则提供 null)。Creates a UnaryExpression that represents an explicit reference or boxing conversion where null is supplied if the conversion fails.

TypeEqual(Expression, Type) TypeEqual(Expression, Type) TypeEqual(Expression, Type) TypeEqual(Expression, Type)

创建一个比较运行时类型标识的 TypeBinaryExpressionCreates a TypeBinaryExpression that compares run-time type identity.

TypeIs(Expression, Type) TypeIs(Expression, Type) TypeIs(Expression, Type) TypeIs(Expression, Type)

创建一个 TypeBinaryExpressionCreates a TypeBinaryExpression.

UnaryPlus(Expression) UnaryPlus(Expression) UnaryPlus(Expression) UnaryPlus(Expression)

创建一个表示一元正运算的 UnaryExpressionCreates a UnaryExpression that represents a unary plus operation.

UnaryPlus(Expression, MethodInfo) UnaryPlus(Expression, MethodInfo) UnaryPlus(Expression, MethodInfo) UnaryPlus(Expression, MethodInfo)

创建一个表示一元正运算的 UnaryExpressionCreates a UnaryExpression that represents a unary plus operation.

Unbox(Expression, Type) Unbox(Expression, Type) Unbox(Expression, Type) Unbox(Expression, Type)

创建一个表示显式取消装箱的 UnaryExpressionCreates a UnaryExpression that represents an explicit unboxing.

Variable(Type) Variable(Type) Variable(Type) Variable(Type)

创建一个 ParameterExpression 节点,该节点可用于标识表达式树中的参数或变量。Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.

Variable(Type, String) Variable(Type, String) Variable(Type, String) Variable(Type, String)

创建一个 ParameterExpression 节点,该节点可用于标识表达式树中的参数或变量。Creates a ParameterExpression node that can be used to identify a parameter or a variable in an expression tree.

VisitChildren(ExpressionVisitor) VisitChildren(ExpressionVisitor) VisitChildren(ExpressionVisitor) VisitChildren(ExpressionVisitor)

简化节点,然后对简化的表达式调用访问者委托。Reduces the node and then calls the visitor delegate on the reduced expression. 该方法在节点不可简化时引发异常。The method throws an exception if the node is not reducible.

适用于