語言

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

在收藏中尋找牢房。

傳回

若參數值在集合中,則為以零為基礎的索引 dataGridViewCell ;否則為 -1。

適用於

另請參閱