TaskCompletionSource(TResult) Constructor (Object, TaskCreationOptions)

TaskCompletionSource(Of TResult) Constructor (Object, TaskCreationOptions)

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

Creates a TaskCompletionSource(Of TResult) with the specified state and options.

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

'Declaration
Public Sub New ( _
	state As Object, _
	creationOptions As TaskCreationOptions _
)

Parameters

state
Type: System.Object
The state to use as the underlying Task(Of TResult)'s AsyncState.
creationOptions
Type: System.Threading.Tasks.TaskCreationOptions
The options to use when creating the underlying Task(Of TResult).

ExceptionCondition
ArgumentOutOfRangeException

The creationOptions represent options invalid for use with a TaskCompletionSource(Of TResult).

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft