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

定义

将列表中位于给定位置的元素替换为指定的元素。

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

参数

index
Int32

要替换的元素列表中的位置。

value
T

要替换旧元素的元素。

返回

包含新元素的新列表,即使指定位置的元素与新元素相同。

适用于