Data Structures and Algorithms with Object-Oriented Design Patterns in C#
next up previous contents index

DynamicArray Properties

Program gif defines three properties of DynamicArrays--Data, BaseIndex, and Length. These properties provide the means to inspect the contents of a DynamicArray object (using the get accessor  methods) and the means to modify the contents of a DynamicArray object (using the set accessor  methods).

Clearly, the running times of each of the BaseIndex property get and set accessors is a constant. Similarly, the running time of the Length property set accessor is also a constant.

   program2776
Program: DynamicArray properties.


next up previous contents index

Bruno Copyright © 2001 by Bruno R. Preiss, P.Eng. All rights reserved.