Array elements - counting

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • john sutor

    #1

    Array elements - counting

    If you are working with a 2 dimensional array with 3 elements per record
    (0,0)
    (0,1)
    (0,2)

    How do you get the correct count of records in the Array? The count method
    give you back a count of all of the elements.


  • Jon Skeet

    #2
    Re: Array elements - counting

    john sutor <john_sutor@cin fin.com> wrote:[color=blue]
    > If you are working with a 2 dimensional array with 3 elements per record
    > (0,0)
    > (0,1)
    > (0,2)[/color]

    Do you mean a proper two-dimensional rectangular array, or an array of
    arrays? My guess is the former - in which case, use GetUpperBound(0 ) to
    get the size of the first dimension, and GetUpperBound(1 ) to get the
    size of the second. (I'm assuming that the lower bound of each is 0.)

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    Working...