SynchronizedCollection<T>.RemoveAt(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
從集合中移除位於指定索引處的專案。
public:
virtual void RemoveAt(int index);
public void RemoveAt(int index);
abstract member RemoveAt : int -> unit
override this.RemoveAt : int -> unit
Public Sub RemoveAt (index As Integer)
參數
- index
- Int32
從集合中擷取元素的以零為基礎的索引。
實作
例外狀況
指定的是 index 小於零或大於集合中項目數量。
備註
集合中緊接被移除元素後的元素會往上移動,填補空出的位置,並相應更新索引。