Task.IsCanceled Property

Gets whether this Task instance has completed execution due to being canceled.

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

public bool IsCanceled { get; }

Property Value

Type: System.Boolean
true if the task has completed due to being canceled; otherwise false.

A Task will complete in Canceled state either if its CancellationToken() was marked for cancellation before the task started executing, or if the task acknowledged the cancellation request on its already signaled CancellationToken by throwing an OperationCanceledException that bears the same CancellationToken.


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