ItemCollection.RemoveAt(Int32) 方法

定義

從集合或檢視移除位於指定索引的項目。

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 作用中。

索引超出範圍。

備註

從集合中移除專案時,任何具有較高索引值的剩餘專案都會隨著集合大小折迭而遞減其索引。

適用於