RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
DynamicArray::Length Property

Represents the number of elements in the System::DynamicArray.

Pascal
property Length: Integer;
C++
__property int Length;

Use the System::DynamicArray::Length property to set or get the length of the dynamic array. The following code sets the length of a System::DynamicArray to 10. 

System::DynamicArray<int> arrayOfInt;

arrayOfInt.Length = 10;
cout << "ArrayLength: " << arrayOfInt.Length << endl;

SetSystem::DynamicArray::Length(arrayOfInt, 10); 

To free a dynamic array, simply set its System::DynamicArray::Length to 0: 

arrayOfInt.System::DynamicArray::Length = 0; 

 

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