Прочетете на английски Редактиране

Споделяне чрез


ImmutableInterlocked.InterlockedCompareExchange<T> Method

Definition

Compares two immutable arrays for equality and, if they are equal, replaces one of the arrays.

C#
public static System.Collections.Immutable.ImmutableArray<T> InterlockedCompareExchange<T>(ref System.Collections.Immutable.ImmutableArray<T> location, System.Collections.Immutable.ImmutableArray<T> value, System.Collections.Immutable.ImmutableArray<T> comparand);

Type Parameters

T

The type of element stored by the array.

Parameters

location
ImmutableArray<T>

The destination, whose value is compared with comparand and possibly replaced.

value
ImmutableArray<T>

The value that replaces the destination value if the comparison results in equality.

comparand
ImmutableArray<T>

The value that is compared to the value at location.

Returns

The original value in location.

Applies to

Продукт Версии
.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 (package-provided), 8, 9 (package-provided), 9, 10 (package-provided), 10
.NET Standard 2.0 (package-provided)
UWP 10.0