語言

ArraySegment<T>.IList<T>.IndexOf(T) 方法

定義

決定陣列區段中特定專案的索引。

 virtual int System.Collections.Generic.IList<T>.IndexOf(T item) = System::Collections::Generic::IList<T>::IndexOf;
int IList<T>.IndexOf(T item);
abstract member System.Collections.Generic.IList<T>.IndexOf : 'T -> int
override this.System.Collections.Generic.IList<T>.IndexOf : 'T -> int
Function IndexOf (item As T) As Integer Implements IList(Of T).IndexOf

參數

item
T

要定位在陣列區段中的物件。

傳回

如果在列表中找到,則為 的 item 索引;否則,為 -1。

實作

例外狀況

底層陣列為 null。

備註

此成員為明確介面成員實作。 它只能在實 ArraySegment<T> 例投射到 IList<T> 介面時使用。

適用於