語言

IListContract<C>.RemoveAt(Int32) 方法

定義

拿掉位於指定索引處的專案。

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後,跟隨被移除元素的元素會移動到空出的位置。 移動元素的索引也會同步更新。

要判斷 a IListContract<C> 是否為唯讀,請呼叫該 GetIsReadOnly 方法。

適用於