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

Definición

Busca el primer elemento de la matriz igual al valor especificado y reemplaza el valor por el nuevo 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

Valor para buscar y reemplazar en la matriz.

newValue
T

Valor por el oldvalue que se va a reemplazar.

equalityComparer
IEqualityComparer<T>

Comparador de igualdad a usar para comparar los valores.

Devoluciones

Una nueva matriz que contiene newValue incluso si los valores nuevos y antiguos son los mismos.

Implementaciones

Excepciones

oldValue no se encuentra en la matriz.

Comentarios

Este miembro es una implementación explícita de un miembro de interfaz. Solo se puede utilizar cuando la instancia de ImmutableArray<T> se convierte en una interfaz IImmutableList<T>.

Se aplica a