ImmutableArray<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

oldvalueを置き換える値。

equalityComparer
IEqualityComparer<T>

値の比較に使用する等価比較子。

返品

新しい値と古い値が同じである場合でも、 newValue を含む新しい配列。

実装

例外

oldValue が配列に見つかりません。

注釈

このメンバーは、明示的なインターフェイス メンバーの実装です。 ImmutableArray<T> インスタンスがIImmutableList<T> インターフェイスにキャストされている場合にのみ使用できます。

適用対象