ImmutableList<T>.Replace Metodo

Definizione

Overload

Replace(T, T, IEqualityComparer<T>)

Sostituisce l'elemento specificato nell'elenco non modificabile con un nuovo elemento.

Replace(T, T)

Sostituisce l'elemento specificato nell'elenco non modificabile con un nuovo elemento.

Replace(T, T, IEqualityComparer<T>)

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

Sostituisce l'elemento specificato nell'elenco non modificabile con un nuovo 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)

Parametri

oldValue
T

Elemento da sostituire nell'elenco.

newValue
T

Elemento con cui sostituire oldValue.

equalityComparer
IEqualityComparer<T>

Operatore di confronto da usare per verificare l'uguaglianza.

Restituisce

Nuovo elenco con l'oggetto sostituito o questo elenco se l'oggetto specificato non è presente nell'elenco.

Si applica a

Replace(T, T)

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

Sostituisce l'elemento specificato nell'elenco non modificabile con un nuovo 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)

Parametri

oldValue
T

Elemento da sostituire.

newValue
T

Elemento con cui sostituire oldValue.

Restituisce

Nuovo elenco con l'elemento sostituito, anche se è uguale all'elemento precedente.

Eccezioni

oldValue non esiste nell'elenco non modificabile.

Si applica a