CancellationToken.Equality(CancellationToken, CancellationToken) CancellationToken.Equality(CancellationToken, CancellationToken) CancellationToken.Equality(CancellationToken, CancellationToken) CancellationToken.Equality(CancellationToken, CancellationToken) Operator

定义

确定两个 CancellationToken 实例是否相等。Determines whether two CancellationToken instances are equal.

public:
 static bool operator ==(System::Threading::CancellationToken left, System::Threading::CancellationToken right);
public static bool operator == (System.Threading.CancellationToken left, System.Threading.CancellationToken right);
static member ( = ) : System.Threading.CancellationToken * System.Threading.CancellationToken -> bool
Public Shared Operator == (left As CancellationToken, right As CancellationToken) As Boolean

参数

left
CancellationToken CancellationToken CancellationToken CancellationToken

第一个实例。The first instance.

right
CancellationToken CancellationToken CancellationToken CancellationToken

第二个实例。The second instance.

返回

如果实例相等,则为 true;否则为 false。有关详细信息,请参阅备注部分。true 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:

适用于

另请参阅