Task.AsyncState Property

Gets the state object supplied when the Task was created, or null if none was supplied.

Namespace:  System.Threading.Tasks
Assembly:  mscorlib (in mscorlib.dll)

public Object AsyncState { get; }

Property Value

Type: System.Object
An System.Object that represents the state data that was passed in to the task when it was created.

Implements

IAsyncResult.AsyncState

Cast the object back to the original type to retrieve its data.

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

ADD
Show: