Jazyk

ImmutableInterlocked.InterlockedCompareExchange<T> Metoda

Definice

Porovná dvě neměnná pole pro rovnost a pokud jsou rovna, nahradí jedno z polí.

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 uloženého polem.

Parametry

location
ImmutableArray<T>

Cíl, jehož hodnota je porovnána comparand a případně nahrazena.

value
ImmutableArray<T>

Hodnota, která nahradí cílovou hodnotu, pokud porovnání vede k rovnosti.

comparand
ImmutableArray<T>

Hodnota, která je porovnána s hodnotou v location.

Návraty

Původní hodnota v location.

Platí pro