Поделиться через


CancellationToken.CanBeCanceled Property

Microsoft Silverlight will reach end of support after October 2021. Learn more.

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

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

Syntax

'Declaration
Public ReadOnly Property CanBeCanceled As Boolean
public bool CanBeCanceled { get; }

Property Value

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

Remarks

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

Version Information

Silverlight

Supported in: 5

Platforms

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