ImmutableList<T>.Replace Método

Definición

Sobrecargas

Nombre Description
Replace(T, T, IEqualityComparer<T>)

Reemplaza el elemento especificado en la lista inmutable por un nuevo elemento.

Replace(T, T)

Reemplaza el elemento especificado en la lista inmutable por un nuevo elemento.

Replace(T, T, IEqualityComparer<T>)

Source:
ImmutableList_1.cs
Source:
ImmutableList_1.cs
Source:
ImmutableList_1.cs
Source:
ImmutableList_1.cs
Source:
ImmutableList_1.cs
Source:
ImmutableList_1.cs

Reemplaza el elemento especificado en la lista inmutable por un nuevo elemento.

public:
 System::Collections::Immutable::ImmutableList<T> ^ Replace(T oldValue, T newValue, System::Collections::Generic::IEqualityComparer<T> ^ equalityComparer);
public System.Collections.Immutable.ImmutableList<T> Replace(T oldValue, T newValue, System.Collections.Generic.IEqualityComparer<T> equalityComparer);
public System.Collections.Immutable.ImmutableList<T> Replace(T oldValue, T newValue, System.Collections.Generic.IEqualityComparer<T>? equalityComparer);
member this.Replace : 'T * 'T * System.Collections.Generic.IEqualityComparer<'T> -> System.Collections.Immutable.ImmutableList<'T>
Public Function Replace (oldValue As T, newValue As T, equalityComparer As IEqualityComparer(Of T)) As ImmutableList(Of T)

Parámetros

oldValue
T

Elemento que se va a reemplazar en la lista.

newValue
T

Elemento por el que se va a reemplazar oldValue .

equalityComparer
IEqualityComparer<T>

Comparador que se va a usar para comprobar si hay igualdad.

Devoluciones

Nueva lista con el objeto reemplazado o esta lista si el objeto especificado no está en esta lista.

Se aplica a

Replace(T, T)

Source:
ImmutableList_1.cs
Source:
ImmutableList_1.cs
Source:
ImmutableList_1.cs
Source:
ImmutableList_1.cs
Source:
ImmutableList_1.cs
Source:
ImmutableList_1.cs

Reemplaza el elemento especificado en la lista inmutable por un nuevo elemento.

public:
 System::Collections::Immutable::ImmutableList<T> ^ Replace(T oldValue, T newValue);
public System.Collections.Immutable.ImmutableList<T> Replace(T oldValue, T newValue);
member this.Replace : 'T * 'T -> System.Collections.Immutable.ImmutableList<'T>
Public Function Replace (oldValue As T, newValue As T) As ImmutableList(Of T)

Parámetros

oldValue
T

Elemento que se va a reemplazar.

newValue
T

Elemento por el que se va a reemplazar oldValue .

Devoluciones

Nueva lista con el elemento reemplazado, incluso si es igual al elemento anterior.

Excepciones

oldValue no existe en la lista inmutable.

Se aplica a