CancellationToken Constructor
Collapse the table of content
Expand the table of content

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:
© 2017 Microsoft