Task.AsyncState 屬性

定義

取得建立 Task 時提供的狀態物件,如果未提供則為 null。Gets the state object supplied when the Task was created, or null if none was supplied.

public:
 property System::Object ^ AsyncState { System::Object ^ get(); };
public object AsyncState { get; }
member this.AsyncState : obj
Public ReadOnly Property AsyncState As Object

屬性值

Object,代表工作建立時傳入工作的狀態資料。An Object that represents the state data that was passed in to the task when it was created.

實作

備註

將物件轉換回原始類型,以取出其資料。Cast the object back to the original type to retrieve its data.

適用於