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 Constructor

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

Initializes the CancellationToken.

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

public CancellationToken(
	bool canceled
)

Parameters

canceled
Type: System.Boolean
The canceled state for the token.

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.

Windows Phone OS

Supported in: 8.1, 8.0

Show: