ItemCollection.RemoveAt(Int32) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
移除集合或檢視指定索引的項目。
public:
virtual void RemoveAt(int removeIndex);
public void RemoveAt(int removeIndex);
abstract member RemoveAt : int -> unit
override this.RemoveAt : int -> unit
Public Sub RemoveAt (removeIndex As Integer)
參數
- removeIndex
- Int32
要移除的項目的零基指數。
實作
例外狀況
之 ItemCollection 所以是唯讀,是因為它處於 ItemsSource 模式中,或是 DeferRefresh 正在生效。
指數超出範圍。
備註
當項目從集合中移除時,索引較高的剩餘項目會減少一,因為集合大小會縮小。