Re: Length of a multidimensional array
From: Imran Koradia (nojunk_at_microsoft.com)
Date: 09/22/04
- Next message: Jay B. Harlow [MVP - Outlook]: "Re: BinaryFormatter Serialize DirectCast Class"
- Previous message: Marian F.: "Commenting source code is for amateurs"
- In reply to: Abubakar: "RE: Length of a multidimensional array"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 22 Sep 2004 18:22:43 -0400
you'll need to do array1.getupperbound - array1.getlowerbound to get the
length of the array (number of elements) which is what the OP was asking
for.
Imran.
"Abubakar" <Abubakar@discussions.microsoft.com> wrote in message
news:35375D3C-3B46-4877-8AC5-CBCBAA633DDB@microsoft.com...
> oops
>> and array1.getupperbound(0) will give u 3
>
> i meant array1.getupperbound(1) ofcourse
>
> Ab.
>
> "Abubakar" wrote:
>
>> Hi,
>> its really simple:
>> for your array1(5,3)
>> 5 is at your 0 dimension and 3 at 1
>> so writing
>> array1.getupperbound(0) will give u 5
>> and array1.getupperbound(0) will give u 3
>>
>> hope that helps :-)
>> Abubakar.
>> http://joehacker.blogspot.com
>>
>> "OpticTygre" wrote:
>>
>> > If I have a multidimensional array, such as array1(5, 3), and I want to
>> > find
>> > the length of the first section (the 5), can I just use array1.length,
>> > or
>> > would that return 15 (5 * 3) instead of 5? Thanks in advance.
>> >
>> >
>> >
- Next message: Jay B. Harlow [MVP - Outlook]: "Re: BinaryFormatter Serialize DirectCast Class"
- Previous message: Marian F.: "Commenting source code is for amateurs"
- In reply to: Abubakar: "RE: Length of a multidimensional array"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|