Arrays in Visual Basic

后端 未结 5 1987
长发绾君心
长发绾君心 2020-12-12 04:34

In declaring an array in VB, would you ever leave the zero element empty and adjust the code to make it more user friendly?

This is for Visual Basic 2008

5条回答
  •  自闭症患者
    2020-12-12 05:05

    In visual basic is it possible to declare an array starting from 1, if you find inconvenient to use a 0 based array.

    Dim array(1 to 10) as Integer
    

    It is just a matter of tastes. I use 1 based arrays in visual basic but 0 based arrays in C ;)

提交回复
热议问题