LambdaExpression.Compile 方法
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
生成表示 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 包含 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.
返回
表示对象描述的已编译 lambda 表达式的 LambdaExpression 委托。
适用于
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
调试编译器用于标记序列点和批注局部变量的信息生成器。
返回
包含 lambda 编译版本的委托。