Share via


ImmutableInterlocked.InterlockedCompareExchange<T> Yöntem

Tanım

Eşitlik için iki sabit diziyi karşılaştırır ve eşitse dizilerden birinin yerini alır.

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)

Tür Parametreleri

T

Dizi tarafından depolanan öğenin türü.

Parametreler

location
ImmutableArray<T>

Değeri ile comparand karşılaştırılan ve büyük olasılıkla değiştirilen hedef.

value
ImmutableArray<T>

Karşılaştırma eşitlikle sonuçlanırsa hedef değerin yerini alan değer.

comparand
ImmutableArray<T>

konumundaki değerle karşılaştırılan değer location.

Döndürülenler

içindeki locationözgün değer.

Şunlara uygulanır