语言

IListContract<T>.RemoveAt(Int32) 方法

定义

删除集合中指定索引处的 IListContract<T> 项。

public:
 void RemoveAt(int index);
public void RemoveAt(int index);
abstract member RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)

参数

index
Int32

要删除的项的索引。

例外

index 小于零。

-或-

index 等于或大于方法的 GetCount() 返回值。

注解

调用 RemoveAt后,已删除项后面的项将移动以占据空置的位置。 移动的项的索引也会更新。

若要确定集合是否 IListContract<T> 为只读,请调用该方法 GetIsReadOnly 。

适用于