System.Generics.Collections.TList.Capacity

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property Capacity: Integer read GetCapacity write SetCapacity;

C++

__property int Capacity = {read=GetCapacity, write=SetCapacity, nodefault};

Properties

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

Description

List capacity.

Capacity gets or sets the list capacity, that is, the maximum size of the list without resizing. The capacity cannot be set to less than Count, the actual number of items in the list.

The TrimExcess method reduces the capacity of the list to its current number of elements, Count.

See Also

Code Examples