Array.IList.IndexOf(Object) Method

Definition

決定 IList 中特定項目的索引。Determines the index of a specific item in the IList.

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

Parameters

value
Object

要在目前清單中尋找的物件。The object to locate in the current list.

Returns

Int32

如果在清單中找到,則為值的索引,否則為 -1。The index of value if found in the list; otherwise, -1.

Implements

Remarks

這個成員是明確的介面成員實作。This member is an explicit interface member implementation. 只有在 Array 執行個體轉換成 IList 介面時,才能使用這個成員。It can be used only when the Array instance is cast to an IList interface.

Applies to