TaskCompletionSource(TResult) Constructor (TaskCreationOptions)

TaskCompletionSource<TResult> Constructor (TaskCreationOptions)

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

Creates a TaskCompletionSource<TResult> with the specified options.

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

public TaskCompletionSource(
	TaskCreationOptions creationOptions
)

Parameters

creationOptions
Type: System.Threading.Tasks.TaskCreationOptions
The options to use when creating the underlying Task<TResult>.

ExceptionCondition
ArgumentOutOfRangeException

The creationOptions represent options invalid for use with a TaskCompletionSource<TResult>.

The Task<TResult> created by this instance and accessible through its Task property will be instantiated using the specified creationOptions.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft