Skip to main content

TdxFastList.IndexOf(Pointer,TdxListDirection) Method

Searches the specified pointer within the ordered pointer list.

Declaration

function IndexOf(AItem: Pointer; ADirection: TdxListDirection = ldFromBeginning): Integer;

Parameters

Name Type
AItem Pointer
ADirection TdxListDirection

Returns

Type
Integer

Remarks

Call this function and pass a pointer as the AItem parameter to search it within the ordered pointer list. The optional ADirection parameter allows you to reverse the default search direction, which can be useful if the list is sorted. If the list contains the specified pointer, the IndexOf function returns its index; otherwise, returns -1.

Note

The Remove and Extract functions call IndexOf internally to search the specified pointer.

See Also