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
。
傳回
委派,表示 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
編譯器使用的偵錯資訊產生工具,用以標記序列點以及標註區域變數。
傳回
委派,包含 Lambda 的編譯版本。
適用於
意見反應
https://aka.ms/ContentUserFeedback。
即將登場:在 2024 年,我們將逐步淘汰 GitHub 問題作為內容的意見反應機制,並將它取代為新的意見反應系統。 如需詳細資訊,請參閱:提交並檢視相關的意見反應