vb数组赋值 vb数组赋初值


vb数组赋值 vb数组赋初值

文章插图
大家好,小跳来为大家解答以上的问题 。vb数组赋初值,vb数组赋值这个很多人还不知道,现在让我们一起来看看吧!
1、2种方法1. 直接赋值 。
2、此法只适合和小数组Dim myArray() as Integer ={1,2,3,4,5}或Dim myArray(5)as integermyArray(0)=1myArray(1)=2 myArray(2)=3 myArray(3)=3 myArray(4)=5 myArray(5)=62.最常用的for next循环赋值Dim myArray()as integerFor intCount as Integer= 0 to 5myArray(intCount)=你要赋值的东西Next如果你要每个都不同那就这样:Dim myArray()as integerDim FuZhi as integerFor Fuzhi as 0 to 5For intCount as Integer= 0 to 5myArray(intCount)=fuzhiNext intCountNext fuzhi 。
【vb数组赋值 vb数组赋初值】本文到此分享完毕,希望对大家有所帮助 。