ImmutableList.Replace<T>(IImmutableList<T>, T, T) メソッド
定義
重要
一部の情報は、リリース前に大きく変更される可能性があるプレリリースされた製品に関するものです。 Microsoft は、ここに記載されている情報について、明示または黙示を問わず、一切保証しません。
リスト内の最初の等しい要素を指定した要素に置き換えます。
public:
generic <typename T>
[System::Runtime::CompilerServices::Extension]
static System::Collections::Immutable::IImmutableList<T> ^ Replace(System::Collections::Immutable::IImmutableList<T> ^ list, T oldValue, T newValue);
public static System.Collections.Immutable.IImmutableList<T> Replace<T>(this System.Collections.Immutable.IImmutableList<T> list, T oldValue, T newValue);
static member Replace : System.Collections.Immutable.IImmutableList<'T> * 'T * 'T -> System.Collections.Immutable.IImmutableList<'T>
<Extension()>
Public Function Replace(Of T) (list As IImmutableList(Of T), oldValue As T, newValue As T) As IImmutableList(Of T)
型パラメーター
- T
リスト内の項目の種類。
パラメーター
- list
- IImmutableList<T>
検索するリスト。
- oldValue
- T
置換する要素。
- newValue
- T
古い要素を置き換える要素。
返品
置換される値がその位置の新しい値と等しい場合でも、新しいリスト。
例外
oldValue はリストに存在しません。