Token Property

Task Parallel System.Threading

Gets the CancellationToken associated with this CancellationTokenSource.

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

Syntax

Visual Basic (Declaration)
Public ReadOnly Property Token As CancellationToken
C#
public CancellationToken Token { get; }

Field Value

The CancellationToken associated with this CancellationTokenSource.

Exceptions

ExceptionCondition
System..::.ObjectDisposedExceptionThe token source has been disposed.

See Also