System.Generics.Collections.TList.IndexOfItem

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function IndexOfItem(const Value: T; Direction: TDirection): Integer; inline;

C++

int __fastcall IndexOfItem(const T Value, System::Types::TDirection Direction);

Properties

Type Visibility Source Unit Parent
function public
System.Generics.Collections.pas
System.Generics.Collections.hpp
System.Generics.Collections TList

Description

Searches for an element using linear search, looping through the list items in the specified direction.

This function is identical to IndexOf, only that it allows you to specify in which Direction to search the list, so that you can increase the performance of this operation if you know whether Value is towards the beginning or towards the end of the list.

See Also