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.

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)

public bool CanBeCanceled { get; }

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: