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> 介面時,才能使用這個成員。

適用於