ListView.ColumnHeaderCollection.RemoveAt(Int32) 方法

定義

移除集合中位於指定索引處的資料行行首。

public:
 virtual void RemoveAt(int index);
public virtual void RemoveAt (int index);
abstract member RemoveAt : int -> unit
override this.RemoveAt : int -> unit
Public Overridable Sub RemoveAt (index As Integer)

參數

index
Int32

要移除之資料行行首以零為起始的索引。

實作

例外狀況

index 小於 0,或大於等於 CountListView.ColumnHeaderCollection 屬性值。

備註

當您從集合中移除資料行標頭時,集合中後續資料行標頭的索引會變更。 已刪除已移除之資料行標頭的所有資訊。 您可以使用這個方法,指定要從集合中移除之資料行標頭的索引,以從集合中移除特定資料行標頭。 若要指定要移除的資料行標頭,而不是資料行標頭的索引,請使用 Remove 方法。 若要從集合中移除所有資料行標頭,請使用 Clear 方法。

適用於

另請參閱