ImmutableInterlocked.InterlockedCompareExchange<T> Metoda

Definicja

Porównuje dwie niezmienne tablice pod kątem równości i, jeśli są równe, zastępuje jedną z tablic.

public:
generic <typename T>
 static System::Collections::Immutable::ImmutableArray<T> InterlockedCompareExchange(System::Collections::Immutable::ImmutableArray<T> % location, System::Collections::Immutable::ImmutableArray<T> value, System::Collections::Immutable::ImmutableArray<T> comparand);
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);
static member InterlockedCompareExchange : ImmutableArray * System.Collections.Immutable.ImmutableArray<'T> * System.Collections.Immutable.ImmutableArray<'T> -> System.Collections.Immutable.ImmutableArray<'T>
Public Shared Function InterlockedCompareExchange(Of T) (ByRef location As ImmutableArray(Of T), value As ImmutableArray(Of T), comparand As ImmutableArray(Of T)) As ImmutableArray(Of T)

Parametry typu

T

Typ elementu przechowywanego przez tablicę.

Parametry

location
ImmutableArray<T>

Miejsce docelowe, którego wartość jest porównywana z comparand i ewentualnie zastąpiona.

value
ImmutableArray<T>

Wartość, która zastępuje wartość docelową, jeśli porównanie powoduje równość.

comparand
ImmutableArray<T>

Wartość porównywana z wartością na .location

Zwraca

Oryginalna wartość w pliku location.

Dotyczy