Collection.IList.IndexOf(Object) 方法

定義

判斷 Collection 物件中特定項目的索引。Determines the index of a specific item in the Collection object.

 virtual int IListIndexOf(System::Object ^ value) = System::Collections::IList::IndexOf;
int IList.IndexOf (object value);
Function IListIndexOf (value As Object) As Integer Implements IList.IndexOf

參數

value
Object

要在 Object 物件中尋找的 CollectionThe Object to locate in the Collection object.

傳回

如果可在集合中找到,即為 value 的索引,否則為 -1。The index of value if found in the collection; otherwise, -1.

備註

這個方法會決定 Collection 物件中特定專案的索引。This method determines the index of a specific item in the Collection object.

適用於

另請參閱