Op Englesch liesen Editéieren

Deelen iwwer


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.

C#
public override bool Equals(object other);
C#
public override bool Equals(object? other);

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

.NET 10 an aner Versiounen
Produkt Versiounen
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0

Equals(CancellationToken)

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

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

C#
public bool Equals(System.Threading.CancellationToken other);

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

.NET 10 an aner Versiounen
Produkt Versiounen
.NET Core 1.0, Core 1.1, Core 2.0, Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9, 10
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
.NET Standard 1.0, 1.1, 1.2, 1.3, 1.4, 1.6, 2.0, 2.1
UWP 10.0