CancellationToken.Inequality(CancellationToken, CancellationToken) 運算子

定義

判斷兩個 CancellationToken 執行個體是否不相等。Determines whether two CancellationToken instances are not 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 op_Inequality : System.Threading.CancellationToken * System.Threading.CancellationToken -> bool
Public Shared Operator != (left As CancellationToken, right As CancellationToken) As Boolean

參數

left
CancellationToken

第一個執行個體。The first instance.

right
CancellationToken

第二個執行個體。The second instance.

傳回

如果執行個體不相等,則為 true;否則為 falsetrue if the instances are not equal; otherwise, false.

例外狀況

相關聯的 CancellationTokenSource 已經處置。An associated CancellationTokenSource has been disposed.

備註

如需相等的定義,請參閱 Equals 方法。For the definition of equality, see the Equals method.

適用於

另請參閱