ImmutableArray<T>.IImmutableList<T>.Replace Metoda

Definice

Vyhledá první prvek v poli, který se rovná zadané hodnotě, a nahradí hodnotu zadanou novou hodnotou.

 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

Parametry

oldValue
T

Hodnota, která se má v poli najít a nahradit.

newValue
T

Hodnota, kterou chcete nahradit oldvalue .

equalityComparer
IEqualityComparer<T>

Porovnávač rovnosti, který se má použít k porovnání hodnot.

Návraty

Nové pole, které obsahuje newValue , i když jsou nové a staré hodnoty stejné.

Implementuje

Výjimky

oldValue v poli nebyl nalezen.

Poznámky

Tento člen je explicitní implementace člena rozhraní. Lze jej použít pouze v případě, ImmutableArray<T> že je instance přetypována do IImmutableList<T> rozhraní.

Platí pro