Task.GetAwaiter 方法

定義

取得用來等候這個 Task 的 awaiter。Gets an awaiter used to await this Task.

public:
 System::Runtime::CompilerServices::TaskAwaiter GetAwaiter();
public System.Runtime.CompilerServices.TaskAwaiter GetAwaiter ();
member this.GetAwaiter : unit -> System.Runtime.CompilerServices.TaskAwaiter
Public Function GetAwaiter () As TaskAwaiter

傳回

TaskAwaiter

awaiter 執行個體。An awaiter instance.

備註

這個方法適用于編譯器,而不是在應用程式程式碼中使用。This method is intended for compiler use rather than for use in application code.

適用於