IList<T>.IndexOf(T) Method

Determines the index of a specific item in the IList<T>.

Namespace: Spring.Collections
public
 function IndexOf(const item: T): Integer; overload;

Parameters

item
Type: T

The element to locate in the IList<T>.

Return Value

Type: Integer

The index of item if found in the list; otherwise, -1.

If an element occurs multiple times in the list, the IndexOf method always returns the first instance found.