Share via


ImmutableInterlocked.InterlockedCompareExchange<T> Methode

Definition

Vergleicht zwei unveränderliche Arrays auf Gleichheit und ersetzt eines der Arrays, wenn sie gleich sind.

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)

Typparameter

T

Der Typ des Elements, das durch das Array gespeichert wird.

Parameter

location
ImmutableArray<T>

Das Ziel, dessen Wert mit comparand verglichen und möglicherweise ersetzt wird.

value
ImmutableArray<T>

Der Wert, der den Zielwert ersetzt, wenn der Vergleich Gleichheit ergibt.

comparand
ImmutableArray<T>

Der Wert, der mit dem Wert bei location verglichen wird.

Gibt zurück

Der ursprüngliche Wert in location.

Gilt für: