IList<T>.IndexOf Method
Overloads
| IndexOf(T) |
Determines the index of a specific item in the list. |
| IndexOf(T, Integer) |
Determines the index of a specific item in the list starting at the specified index. |
| IndexOf(T, Integer, Integer) |
Determines the index of a specific item in the list starting at the specified index and for the specified count of elements. |
Determines the index of a specific item in the list.
function IndexOf(const item: T): Integer
Parameters
- item
- T
The element to locate in the list.
Returns
The index of item if found in the list; otherwise, -1.
Determines the index of a specific item in the list starting at the specified index.
function IndexOf(const item: T; index: Integer): Integer
Parameters
- item
- T
The element to locate in the list.
- index
- Integer
The index where to start to locate the specified item in the list.
Returns
The index of item if found in the list; otherwise, -1.
Exceptions
index is not a valid index in the list.
Determines the index of a specific item in the list starting at the specified index and for the specified count of elements.
function IndexOf(const item: T; index: Integer; count: Integer): Integer
Parameters
- item
- T
The element to locate in the list.
- index
- Integer
The index where to start to locate the specified item in the list.
- count
- Integer
The number of items to compare item with.
Returns
The index of item if found in the list; otherwise, -1.