RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
TClassList.Remove Method

Removes the first occurrence of a specified class from the list.

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

Call Remove to delete a specific class from the list when its index is unknown. The value returned is the index of the class in the Items array before it was removed. If the specified object is not found on the list, Remove returns –1. 

After a class is deleted, all the classes that follow it are moved up in index position and Count is decremented. If a class appears more than once on the list, Remove deletes only the first appearance. 

To use an index position (rather than an object reference) to specify the class to be removed, call Delete

 

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