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.
This topic has not yet been rated - Rate this topic

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.

Silverlight

Supported in: 5

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

Show:
© 2014 Microsoft. All rights reserved.