ImmutableList<T>.IImmutableList<T>.Replace(T, T, IEqualityComparer<T>) Método

Definição

Substitui um elemento na lista pelo elemento especificado.Replaces an element in the list with the specified element.

 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 elemento a ser substituído.The element to replace.

newValue
T

O elemento pelo qual substituir o elemento antigo.The element to replace the old element with.

equalityComparer
IEqualityComparer<T>

O comparador de igualdade a ser usado na pesquisa.The equality comparer to use in the search.

Retornos

IImmutableList<T>

A nova lista.The new list.

Implementações

Exceções

Gerado quando o valor antigo não existe na lista.Thrown when the old value does not exist in the list.

Aplica-se a