ImmutableArray<T>.IImmutableList<T>.SetItem(Int32, T) 方法

定义

使用指定项替换指定索引处的项。Replaces the item at the specified index with the specified item.

 virtual System::Collections::Immutable::IImmutableList<T> ^ System.Collections.Immutable.IImmutableList<T>.SetItem(int index, T value) = System::Collections::Immutable::IImmutableList<T>::SetItem;
System.Collections.Immutable.IImmutableList<T> IImmutableList<T>.SetItem (int index, T value);
Function SetItem (index As Integer, value As T) As IImmutableList(Of T) Implements IImmutableList(Of T).SetItem

参数

index
Int32

要替换的项的索引。The index of the item to replace.

value
T

要添加到列表中的值。The value to add to the list.

返回

一个新数组,其指定索引处包含 itemThe new array that contains item at the specified index.

实现

注解

此成员是显式接口成员的实现。This member is an explicit interface member implementation. 它只能在 ImmutableArray<T> 实例被强制转换为 IImmutableList<T> 接口时使用。It can be used only when the ImmutableArray<T> instance is cast to an IImmutableList<T> interface.

适用于