Condividi tramite


CancellationToken Constructor

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

Initializes the CancellationToken.

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

Syntax

'Declaration
Public Sub New ( _
    canceled As Boolean _
)
public CancellationToken(
    bool canceled
)

Parameters

Remarks

Tokens created with this constructor will remain in the canceled state specified by the canceled parameter. If canceled is false, both CanBeCanceled and IsCancellationRequested will be false.

If canceled is true, both CanBeCanceled and IsCancellationRequested will be 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.