System.DynamicArray.High

From RAD Studio API Documentation
Jump to: navigation, search

C++

__property DynArrInt High   = {read=get_high};

Properties

Type Visibility Source Unit Parent
property public sysdyn.h System DynamicArray

Description

Indicates the high bounds of the array.

Reading the High property returns Length-1.

The following function returns the sum of the contents of an integer type DynamicArray.

int TotalArray(const DynamicArray<int>& arrayOfInt)
{
  int total=0;
  for (int i=arrayOfInt.Low; i<=arrayOfInt.High; i++)
    total += arrayOfInt[i];
  return total;
}

See Also