DataGridViewCellCollection.IList.Insert(Int32, Object) メソッド

定義

コレクション内の指定した位置に項目を挿入します。

 virtual void System.Collections.IList.Insert(int index, System::Object ^ value) = System::Collections::IList::Insert;
void IList.Insert (int index, object value);
abstract member System.Collections.IList.Insert : int * obj -> unit
override this.System.Collections.IList.Insert : int * obj -> unit
Sub Insert (index As Integer, value As Object) Implements IList.Insert

パラメーター

index
Int32

値を挿入する位置を示す、0 から始まるインデックスです。

実装

例外

valueDataGridViewCell ではありません。

この DataGridViewCellCollection を所有する行は、既に DataGridView コントロールに属しています。

  • または - dataGridViewCell は既に DataGridViewRow に属しています。

注釈

コントロールに行を追加すると、その行に含まれるセルの数は常にコントロール内の列数と一致するため、このメソッドは役に立たなくなります。

このメンバーは、明示的なインターフェイス メンバーの実装です。 これは、DataGridViewCellCollection のインスタンスが IList インターフェイスにキャストされる場合のみ、使用できます。

適用対象

こちらもご覧ください