ImmutableList<T>.IImmutableList<T>.Replace Метод

Определение

Заменяет элемент в списке указанным элементом.

 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

Параметры

oldValue
T

Элемент для замены.

newValue
T

Элемент, заменяемый старым элементом.

equalityComparer
IEqualityComparer<T>

Сравнение равенства, используемое в поиске.

Возвращаемое значение

Новый список.

Реализации

Исключения

oldValue не существует в списке.

Применяется к