ImmutableList<T>.SetItem(Int32, T) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將不可變清單中指定位置的專案取代為指定的專案。
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
用來替換舊元素的元素。
傳回
即使該元件與舊元素相等於該位置的新列表。