You are right.
Steve C. Orr, MCSD, MVP
"Egghead" <robertlo_NO_SPAM@shaw.ca> wrote in message
news:%23Osy4%23TYFHA.712@TK2MSFTNGP14.phx.gbl...
> When you use the ubound(array) in VB.net, it gives you the upper index of
> the array, nothing to do with Zero based. such as
> dim a as string() = {"A","B","C","D","E"}
> ubound(a) will give you 4, same as in VB 6.0. Therefore, just to know the
> size, it is better to use the length. It gives you 5. Just remember to
> "-1"
> when you use it in a loop.
>
> Do you get your mcsd in C#?
>
> Egghead
>
> "Steve C. Orr [MVP, MCSD]" <Steve@Orr.net> wrote in message
> news:%23WZ7iLQYFHA.2420@TK2MSFTNGP12.phx.gbl...
>> I think you do need it.
>> it's zero based.
>>
>> --
>> I hope this helps,
>> Steve C. Orr, MCSD, MVP
>>
http://SteveOrr.net >>
>>
>> "Egghead" <robertlo_NO_SPAM@shaw.ca> wrote in message
>> news:u8bnsCOYFHA.2128@TK2MSFTNGP15.phx.gbl...
>> > hmmm, I think "Ubound" no need to -1
>> >
>> > Egghead
>> > "Steve C. Orr [MVP, MCSD]" <Steve@Orr.net> wrote in message
>> > news:etcDPNNYFHA.2124@TK2MSFTNGP14.phx.gbl...
>> >> For i = 0 to UBound(MyArray)-1
>> >> ...
>> >> Next
>> >>
>> >> --
>> >> I hope this helps,
>> >> Steve C. Orr, MCSD, MVP
>> >>
http://SteveOrr.net >> >>
>> >>
>> >> "Shapper" <mdmoura*NOSPAM*@gmail.*DELETE2SEND*com> wrote in message
>> >> news:eJVRzgLYFHA.2740@TK2MSFTNGP14.phx.gbl...
>> >> > Hello,
>> >> >
>> >> > I have this for loop:
>> >> >
>> >> > For i = 1 to 10
>> >> > ...
>> >> > Next
>> >> >
>> >> > I want to use the size of an array instead of 10.
>> >> >
>> >> > How to determine the size of an array?
>> >> >
>> >> > Thanks,
>> >> > Miguel
>> >> >
>> >>
>> >>
>> >
>> >
>>
>>
>
>