DataGridViewCellCollection.IndexOf(DataGridViewCell) メソッド

定義

指定したセルのインデックスを返します。

public:
 int IndexOf(System::Windows::Forms::DataGridViewCell ^ dataGridViewCell);
public int IndexOf (System.Windows.Forms.DataGridViewCell dataGridViewCell);
member this.IndexOf : System.Windows.Forms.DataGridViewCell -> int
Public Function IndexOf (dataGridViewCell As DataGridViewCell) As Integer

パラメーター

dataGridViewCell
DataGridViewCell

コレクション内で検索するセル。

戻り値

Int32

dataGridViewCell パラメーターに指定された値がコレクションに存在する場合は、その 0 から始まるインデックス。それ以外の場合は -1。

適用対象

こちらもご覧ください