AsyncState Property

Task.AsyncState Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

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)

'Declaration
Public ReadOnly Property AsyncState As Object

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.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft