Edytuj

Udostępnij za pośrednictwem


CancellationToken.Equals Method

Definition

Determines whether the current CancellationToken instance is equal to the specified token.

Overloads

Equals(Object)

Determines whether the current CancellationToken instance is equal to the specified Object.

Equals(CancellationToken)

Determines whether the current CancellationToken instance is equal to the specified token.

Equals(Object)

Source:
CancellationToken.cs
Source:
CancellationToken.cs
Source:
CancellationToken.cs

Determines whether the current CancellationToken instance is equal to the specified Object.

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

Parameters

other
Object

The other object to compare with this instance.

Returns

true if other is a CancellationToken and if the two instances are equal; otherwise, false. See the Remarks section for more information.

Exceptions

An associated CancellationTokenSource has been disposed.

Remarks

Two cancellation tokens are equal if any one of the following conditions is true:

See also

Applies to

Equals(CancellationToken)

Source:
CancellationToken.cs
Source:
CancellationToken.cs
Source:
CancellationToken.cs

Determines whether the current CancellationToken instance is equal to the specified token.

public:
 bool Equals(System::Threading::CancellationToken other);
public:
 virtual 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

Parameters

other
CancellationToken

The other CancellationToken to compare with this instance.

Returns

true if the instances are equal; otherwise, false. See the Remarks section for more information.

Implements

Remarks

Two cancellation tokens are equal if any one of the following conditions is true:

See also

Applies to