Partilhar via


ImmutableInterlocked.InterlockedCompareExchange<T> Método

Definição

Compara duas matrizes imutáveis quanto à igualdade e, se elas forem iguais, substitui uma das matrizes.

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)

Parâmetros de tipo

T

O tipo de elemento armazenado pela matriz.

Parâmetros

location
ImmutableArray<T>

O destino, cujo valor é comparado com comparand e possivelmente substituído.

value
ImmutableArray<T>

O valor que substitui o valor de destino quando a comparação resulta em igualdade.

comparand
ImmutableArray<T>

O valor comparado ao valor em location.

Retornos

O valor original em location.

Aplica-se a