ImmutableList<T>.SetItem(Int32, T) 方法

定義

以指定元素取代不可變清單中指定位置的元素。

public:
 System::Collections::Immutable::ImmutableList<T> ^ SetItem(int index, T value);
public System.Collections.Immutable.ImmutableList<T> SetItem (int index, T value);
member this.SetItem : int * 'T -> System.Collections.Immutable.ImmutableList<'T>
Public Function SetItem (index As Integer, value As T) As ImmutableList(Of T)

參數

index
Int32

清單中要取代之元素的位置。

value
T

用來取代舊項目的項目。

傳回

含已取代之元素的新清單,即使該元素等於位置上舊的元素。

適用於