TableRowCollection.IList.IndexOf(Object) 方法

定義

搜尋指定的物件,並傳回集合中第一個符合項目之以零起始的索引。

 virtual int System.Collections.IList.IndexOf(System::Object ^ o) = System::Collections::IList::IndexOf;
int IList.IndexOf (object o);
abstract member System.Collections.IList.IndexOf : obj -> int
override this.System.Collections.IList.IndexOf : obj -> int
Function IndexOf (o As Object) As Integer Implements IList.IndexOf

參數

o
Object

要在集合中尋找的物件。

傳回

物件在集合中第一個符合項目之以零起始的索引;如果物件不在集合中,則為 -1。

實作

備註

一般而言,您應該使用 GetRowIndex 方法來取得 物件中 TableRowCollection 專案的索引。

方法是 IList.IndexOf 明確的介面成員實作。 只有在 TableRowCollection 執行個體轉換成 IList 介面時,才能使用這個成員。

適用於

另請參閱