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) 作業,其中 nCount

適用於

另請參閱