CancellationToken.Equals CancellationToken.Equals CancellationToken.Equals CancellationToken.Equals Method

定义

确定当前的 CancellationToken 实例是否等于指定的标记。Determines whether the current CancellationToken instance is equal to the specified token.

重载

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定当前的 CancellationToken 实例是否等于指定的 ObjectDetermines whether the current CancellationToken instance is equal to the specified Object.

Equals(CancellationToken) Equals(CancellationToken) Equals(CancellationToken) Equals(CancellationToken)

确定当前的 CancellationToken 实例是否等于指定的标记。Determines whether the current CancellationToken instance is equal to the specified token.

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

确定当前的 CancellationToken 实例是否等于指定的 ObjectDetermines whether the current CancellationToken instance is equal to the specified Object.

public:
 override bool Equals(System::Object ^ other);
public override bool Equals (object other);
override this.Equals : obj -> bool
Public Overrides Function Equals (other As Object) As Boolean

参数

other
Object Object Object Object

要与此实例进行比较的其他对象。The other object to compare with this instance.

返回

如果 otherCancellationToken 且这两个实例相等,则为 true;否则为 falsetrue if other is a CancellationToken and if the two instances are equal; otherwise, false. 有关详细信息,请参阅备注部分。See the Remarks section for more information.

异常

注解

如果以下条件之一为 true,则两个取消令牌相等:Two cancellation tokens are equal if any one of the following conditions is true:

另请参阅

Equals(CancellationToken) Equals(CancellationToken) Equals(CancellationToken) Equals(CancellationToken)

确定当前的 CancellationToken 实例是否等于指定的标记。Determines whether the current CancellationToken instance is equal to the specified token.

public:
 bool Equals(System::Threading::CancellationToken other);
public bool Equals (System.Threading.CancellationToken other);
override this.Equals : System.Threading.CancellationToken -> bool
Public Function Equals (other As CancellationToken) As Boolean

参数

other
CancellationToken CancellationToken CancellationToken CancellationToken

要与此实例进行比较的其他 CancellationTokenThe other CancellationToken to compare with this instance.

返回

如果实例相等,则为 true;否则为 falsetrue if the instances are equal; otherwise, false. 有关详细信息,请参阅备注部分。See the Remarks section for more information.

注解

如果以下条件之一为 true,则两个取消令牌相等:Two cancellation tokens are equal if any one of the following conditions is true:

另请参阅

适用于