Compartir a través de


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

Definición

Reemplaza un elemento de la lista por el elemento 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

Elemento que se va a reemplazar.

newValue
T

Elemento por el que se va a reemplazar el elemento antiguo.

equalityComparer
IEqualityComparer<T>

Comparador de igualdad que se va a usar en la búsqueda.

Devoluciones

La nueva lista.

Implementaciones

Excepciones

oldValue no existe en la lista.

Se aplica a