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數組賦初值】本文到此分享完畢,希望對大家有所幫助 。