TListBase<T>.IndexOf(T) Method

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

Namespace: Spring.Collections.Base
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.

Implements

IList<T>.IndexOf(T)
IReadOnlyList<T>.IndexOf(T)

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