System.Classes.TList.Count

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Count: Integer read FCount write SetCount;

C++

__property int Count = {read=FCount, write=SetCount, nodefault};

Properties

Type Visibility Source Unit Parent
property public
System.Classes.pas
System.Classes.hpp
System.Classes TList

Description

Indicates the number of entries in the list that are in use.

Read Count to determine the number of entries in the Items array.

Increasing the size of Count will add the necessary number of nil (Delphi) or NULL (C++) pointers to the end of the Items array. Decreasing the size of Count will remove the necessary number of entries from the end of the Items array.

Count is not always the same as the number of objects referenced in the list. Some of the entries in the Items array may contain nil (Delphi) or NULL (C++) pointers. To remove the nil (Delphi) or NULL (C++) pointers and set Count to the number of entries that contain references to objects, call the Pack method.

See Also

Code Examples