RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TClassList.IndexOf Method

Returns the index of the first occurrence in the list of a specified class.

Pascal
function IndexOf(AClass: TClass): Integer;
C++
__fastcall int IndexOf(TClass AClass);

Call IndexOf to get the index for a class in the Items array. The first class in the array has index 0, the second class has index 1, and so on. 

If a class is not in the list, IndexOf returns -1. If a class appears more than once in the list, IndexOf returns the index of the first appearance. 

 

Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
What do you think about this topic? Send feedback!