DataGridViewCellCollection.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

要移除的 DataGridViewCell 之以零為基底的索引。

例外狀況

擁有這個 DataGridViewCellCollection 的資料列已經屬於 DataGridView 控制項。

備註

在將包含的資料列加入控制項 DataGridView 之前,請使用這個方法來改變集合。 將資料列加入控制項之後,它所包含的儲存格數目一律符合 控制項中的資料行數目,因此此方法不再有用。

適用於

另請參閱