語言

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() 回傳值。

本 IListContract<T> 合集為唯讀。

備註

在你喊 RemoveAt出 後,跟著被移除物品後的物品會移動到空出的位置。 移動項目的索引也會同步更新。

要判斷一個 IListContract<T> 集合是否為唯讀,請呼叫該 GetIsReadOnly 方法。

適用於