SchemaNameCollection.IList.IndexOf(Object) 方法

定義

判斷清單中指定之項目的索引。

 virtual int System.Collections.IList.IndexOf(System::Object ^ value) = System::Collections::IList::IndexOf;
int IList.IndexOf (object value);
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

參數

value
Object

要在清單中尋找的項目。

傳回

如果可在清單中找到則為 value 的索引,否則為 -1。

實作

備註

從 .NET Framework 2.0 開始,這個方法會使用集合中物件的 Equals 和 CompareTo 方法來判斷專案是否存在。 在舊版的 .NET Framework 中,已使用集合中物件上 item 參數的 Equals 和 CompareTo 方法進行這項判斷。

適用於