CancellationToken.None Property


傳回空的 CancellationToken 值。Returns an empty CancellationToken value.

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

Property Value


空的取消語彙基元。An empty cancellation token.


無法取消此屬性所傳回的取消權杖;也就是說,它的 CanBeCanceled 屬性是 falseThe cancellation token returned by this property cannot be canceled; that is, its CanBeCanceled property is false.

您也可以使用C# default (CancellationToken)語句來建立空的解除標記。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