TArray.IndexOf<T> Method

Overloads

IndexOf<T>(array of T, T)

Searches for the specified element and returns the index of the first occurrence within the entire array.

IndexOf<T>(array of T, T, Integer)

Searches for the specified element and returns the index of the first occurrence within the range of elements in the array that extends from the specified index to the last element.

IndexOf<T>(array of T, T, Integer, Integer)

Searches for the specified element and returns the index of the first occurrence within the range of elements in the array that starts at the specified index and contains the specified number of elements.

IndexOf<T>(array of T, T, Integer, Integer, IEqualityComparer<T>)

Searches for the specified element and returns the index of the first occurrence within the range of elements in the array that starts at the specified index and contains the specified number of elements using the specified equality comparer.

IndexOf<T>(array of T, T)

Searches for the specified element and returns the index of the first occurrence within the entire array.

Delphi
class function IndexOf<T>(const values: array of T; const item: T): Integer

Type Parameters

T

Parameters

values
array of T
item
T

Returns

Integer

IndexOf<T>(array of T, T, Integer)

Searches for the specified element and returns the index of the first occurrence within the range of elements in the array that extends from the specified index to the last element.

Delphi
class function IndexOf<T>(const values: array of T; const item: T; index: Integer): Integer

Type Parameters

T

Parameters

values
array of T
item
T
index
Integer

Returns

Integer

IndexOf<T>(array of T, T, Integer, Integer)

Searches for the specified element and returns the index of the first occurrence within the range of elements in the array that starts at the specified index and contains the specified number of elements.

Delphi
class function IndexOf<T>(const values: array of T; const item: T; index: Integer; count: Integer): Integer

Type Parameters

T

Parameters

values
array of T
item
T
index
Integer
count
Integer

Returns

Integer

IndexOf<T>(array of T, T, Integer, Integer, IEqualityComparer<T>)

Searches for the specified element and returns the index of the first occurrence within the range of elements in the array that starts at the specified index and contains the specified number of elements using the specified equality comparer.

Delphi
class function IndexOf<T>(const values: array of T; const item: T; index: Integer; count: Integer; const comparer: IEqualityComparer<T>): Integer

Type Parameters

T

Parameters

values
array of T
item
T
index
Integer
count
Integer
comparer
IEqualityComparer<T>

Returns

Integer