Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

TaskCompletionSource<TResult>::TrySetCanceled Method

.NET Framework (current version)
 

Attempts to transition the underlying Task<TResult> into the TaskStatus::Canceled state.

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

NameDescription
System_CAPS_pubmethodTrySetCanceled()

Attempts to transition the underlying Task<TResult> into the Canceled state.

System_CAPS_pubmethodTrySetCanceled(CancellationToken)

Attempts to transition the underlying Task<TResult> into the TaskStatus::Canceled state and enables a cancellation token to be stored in the canceled task.

Return to top
Show:
© 2017 Microsoft