IsCanceled Property

Task Parallel System.Threading

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

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

Syntax

Visual Basic (Declaration)
Public ReadOnly Property IsCanceled As Boolean
C#
public bool IsCanceled { get; }

Remarks

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.

See Also