ValueTask.Equality(ValueTask, ValueTask) Operator

Definition

Compares two ValueTask values for equality.

C#
public static bool operator ==(System.Threading.Tasks.ValueTask left, System.Threading.Tasks.ValueTask right);

Parameters

left
ValueTask

The first value to compare.

right
ValueTask

The second value to compare.

Returns

true if the two ValueTask values are equal; otherwise, false.

Remarks

Two ValueTask instances are equal when they wrap the same Task or the same pair of the IValueTaskSource object and the token.

Applies to

Product Versions
.NET Core 2.1, Core 2.2, Core 3.0, Core 3.1, 5, 6, 7, 8, 9
.NET Framework 4.7 (package-provided), 4.7.1 (package-provided), 4.7.2 (package-provided), 4.8 (package-provided)
.NET Standard 2.0 (package-provided), 2.1