Note

Access to this page requires authorization. You can try signing in or .

Access to this page requires authorization. You can try .

CancellationToken.None Property

Definition

Namespace:
System.Threading
Assemblies:
mscorlib.dll, System.Threading.Tasks.dll
Assemblies:
netstandard.dll, System.Runtime.dll
Assembly:
System.Threading.Tasks.dll
Assembly:
System.Runtime.dll
Assembly:
mscorlib.dll
Assembly:
netstandard.dll
Source:
CancellationToken.cs
Source:
CancellationToken.cs
Source:
CancellationToken.cs
Source:
CancellationToken.cs
Source:
CancellationToken.cs

Important

Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.

Returns an empty CancellationToken value.

public:
 static property System::Threading::CancellationToken None { System::Threading::CancellationToken get(); };
public static System.Threading.CancellationToken None { get; }
static member None : System.Threading.CancellationToken
Public Shared ReadOnly Property None As CancellationToken

Property Value

An empty cancellation token.

Remarks

The cancellation token returned by this property cannot be canceled; that is, its CanBeCanceled property is false.

You can also use the C# default(CancellationToken) statement to create an empty cancellation token.

Two empty cancellation tokens are always equal.

Applies to

See also


Feedback

Was this page helpful?