語言

SortedList<TKey,TValue>.RemoveAt(Int32) 方法

定義

拿掉位於 SortedList<TKey,TValue>之指定索引處的專案。

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

參數

index
Int32

要移除的元素的零基指數。

例外狀況

index 小於零。

-或-

index 等於或大於 Count。

備註

元素會往上移動以填補空位,因此此方法是一個 O(n) 操作,其中 n 是 Count。

適用於

另請參閱