SortedList<TKey,TValue>.RemoveAt(Int32) SortedList<TKey,TValue>.RemoveAt(Int32) SortedList<TKey,TValue>.RemoveAt(Int32) SortedList<TKey,TValue>.RemoveAt(Int32) Method

定義

移除 SortedList<TKey,TValue> 之指定索引處的項目。Removes the element at the specified index of the 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 Int32 Int32 Int32

移除項目之以零為起始的索引。The zero-based index of the element to remove.

例外狀況

index 小於零。index is less than zero.

-或--or- index 等於或大於 Countindex is equal to or greater than Count.

備註

這個方法會執行二進位搜尋;不過, 元素會向上移動以填滿開啟的位置, 因此這個方法是 O (n) 運算, 其中nCountThis method performs a binary search; however, the elements are moved up to fill in the open spot, so this method is an O(n) operation, where n is Count.

適用於

另請參閱