DataRowCollection.IndexOf(DataRow) 方法

定義

取得指定 DataRow 物件的索引。Gets the index of the specified DataRow object.

public:
 int IndexOf(System::Data::DataRow ^ row);
public int IndexOf (System.Data.DataRow? row);
public int IndexOf (System.Data.DataRow row);
member this.IndexOf : System.Data.DataRow -> int
Public Function IndexOf (row As DataRow) As Integer

參數

row
DataRow

要搜尋的 DataRowThe DataRow to search for.

傳回

Int32

資料列的以零起始之索引;如果在集合中找不到此資料列,則為 -1。The zero-based index of the row, or -1 if the row is not found in the collection.

適用於