ImmutableList<T>.IImmutableList<T>.Replace(T, T, IEqualityComparer<T>) メソッド

定義

リスト内の要素を、指定した要素に置換します。Replaces an element in the list with the specified element.

 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

置換する要素。The element to replace.

newValue
T

古い要素を置換する要素。The element to replace the old element with.

equalityComparer
IEqualityComparer<T>

検索に使用する等値比較子。The equality comparer to use in the search.

戻り値

IImmutableList<T>

新しいリスト。The new list.

実装

例外

リスト内に古い値が存在しない場合にスローされます。Thrown when the old value does not exist in the list.

適用対象