XArrayDB Reference > XArrayDB Properties > Count Property (XArrayDB) |
This property returns a long integer that specifies the number of elements contained in a given dimension of an XArrayDB object.
nDim is a one-based integer specifying an array dimension.
Read-only at run time. Not available at design time.
The value returned is always equal to:
MyArray.UpperBound(nDim) - MyArray.LowerBound(nDim) + 1
The nDim argument should be 1 for rows and 2 for columns. A trappable error occurs if an invalid dimension is specified.
The following example uses one-based row indexes (the first dimension) and zero-based column indexes (the second dimension):
N = MyArray.Count(1) ' returns 100
N = MyArray.Count(2) ' returns 6