CanBeCanceled Property
Collapse the table of content
Expand the table of content

CancellationToken.CanBeCanceled Property

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Gets whether this token is capable of being in the canceled state.

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

'Declaration
Public ReadOnly Property CanBeCanceled As Boolean

Property Value

Type: System.Boolean
true if this token is capable of being in the canceled state; otherwise false.

If CanBeCanceled returns false, it is guaranteed that the token will never transition into a canceled state, meaning that IsCancellationRequested will never return true.

Windows Phone OS

Supported in: 8.1, 8.0

Show:
© 2017 Microsoft