OperationCanceledException.CancellationToken 属性

定义

获取与已取消的操作关联的令牌。

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

属性值

与已取消的操作关联的令牌,或默认令牌。

注解

如果令牌与取消的操作相关联,则 CancellationToken.IsCancellationRequested 令牌的 属性返回 true

适用于