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 參數值之以零起始的索引 (如果在集合中找得到),否則為 -1。

適用於

另請參閱