Export (0) Print
Expand All

OperationCanceledException.CancellationToken Property

Gets a token associated with the operation that was canceled.

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

public CancellationToken CancellationToken { get; }

Property Value

Type: System.Threading.CancellationToken
A token associated with the operation that was canceled, or a default token.

If the token is associated with a canceled operation, the CancellationToken.IsCancellationRequested property of the token returns true.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4

Portable Class Library

Supported in: Portable Class Library

Supported in: Windows Phone 8.1

Supported in: Windows Phone Silverlight 8.1

Supported in: Windows Phone Silverlight 8
Show:
© 2015 Microsoft