ImmutableArray<T>.IImmutableList<T>.Replace Método

Definição

Localiza o primeiro elemento na matriz igual ao valor especificado e substitui o valor pelo novo valor especificado.

 virtual System::Collections::Immutable::IImmutableList<T> ^ System.Collections.Immutable.IImmutableList<T>.Replace(T oldValue, T newValue, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer) = System::Collections::Immutable::IImmutableList<T>::Replace;
System.Collections.Immutable.IImmutableList<T> IImmutableList<T>.Replace(T oldValue, T newValue, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
abstract member System.Collections.Immutable.IImmutableList<T>.Replace : 'T * 'T * System.Collections.Generic.IEqualityComparer<'T> -> System.Collections.Immutable.IImmutableList<'T>
override this.System.Collections.Immutable.IImmutableList<T>.Replace : 'T * 'T * System.Collections.Generic.IEqualityComparer<'T> -> System.Collections.Immutable.IImmutableList<'T>
Function Replace (oldValue As T, newValue As T, equalityComparer As IEqualityComparer(Of T)) As IImmutableList(Of T) Implements IImmutableList(Of T).Replace

Parâmetros

oldValue
T

O valor a ser localizado e substituído na matriz.

newValue
T

O valor pelo qual oldvalue substituir.

equalityComparer
IEqualityComparer<T>

O comparador de igualdade a ser usado para comparar valores.

Retornos

Uma nova matriz que contém newValue mesmo se os valores novos e antigos forem os mesmos.

Implementações

Exceções

oldValue não é encontrado na matriz.

Comentários

Esse membro é uma implementação de membro de interface explícita. Ele só pode ser usado quando a ImmutableArray<T> instância é convertida em uma IImmutableList<T> interface.

Aplica-se a