LambdaExpression.Compile 方法

定义

生成表示 lambda 表达式的委托。

重载

Compile()

生成表示 lambda 表达式的委托。

Compile(Boolean)

生成表示 Lambda 表达式的已解释或已编译委托。

Compile(DebugInfoGenerator)

生成表示 lambda 表达式的委托。

Compile()

生成表示 lambda 表达式的委托。

public:
 Delegate ^ Compile();
public Delegate Compile ();
member this.Compile : unit -> Delegate
Public Function Compile () As Delegate

返回

Delegate

一个 Delegate,它包含 lambda 表达式的已编译版本。

注解

该方法 Compile 可用于将表达式树转换为 LambdaExpression 它所表示的委托。

适用于

Compile(Boolean)

生成表示 Lambda 表达式的已解释或已编译委托。

public:
 Delegate ^ Compile(bool preferInterpretation);
public Delegate Compile (bool preferInterpretation);
member this.Compile : bool -> Delegate
Public Function Compile (preferInterpretation As Boolean) As Delegate

参数

preferInterpretation
Boolean

如果可用,则为 true,指示表达式应编译为已解释的形式;否则为 false

返回

Delegate

一个委托,表示 LambdaExpression 对象所描述的已编译 Lambda 表达式。

适用于

Compile(DebugInfoGenerator)

生成表示 lambda 表达式的委托。

public:
 Delegate ^ Compile(System::Runtime::CompilerServices::DebugInfoGenerator ^ debugInfoGenerator);
public Delegate Compile (System.Runtime.CompilerServices.DebugInfoGenerator debugInfoGenerator);
member this.Compile : System.Runtime.CompilerServices.DebugInfoGenerator -> Delegate
Public Function Compile (debugInfoGenerator As DebugInfoGenerator) As Delegate

参数

debugInfoGenerator
DebugInfoGenerator

编译器用于标记序列点并批注局部变量的调试信息生成器。

返回

Delegate

包含 lambda 的已编译版本的委托。

适用于