System.Rtti.TRttiArrayType.TotalElementCount

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property TotalElementCount: Integer read GetTotalElementCount;

C++

__property int TotalElementCount = {read=GetTotalElementCount, nodefault};

Properties

Type Visibility Source Unit Parent
property public
System.Rtti.pas
System.Rtti.hpp
System.Rtti TRttiArrayType

Description

Specifies the total number of elements the array can store.

Use TotalElementCount to obtain the total number of elements that can be stored in the static array. Because a static array has a predefined number of elements, it is possible to obtain the number based on type definition (unlike in the case of dynamic arrays).

TotalElementCount returns the total number of elements from all the dimensions in the array. If the static array is declared like array[0..1, 0..2], the value of TotalElementCount is 6, because there are 2 elements on the X coordinate and 3 on the Y coordinate.

See Also