Multiple Variables

后端 未结 9 2019
不知归路
不知归路 2020-12-19 04:49

Is there a way to give a value to multiple variables (integers in this case), instead of all at once?

For instance, I have Dim aceVal, twoVal, threeVal, fourVa

9条回答
  •  萌比男神i
    2020-12-19 05:43

    You can declare and asign the value using the constructor:

     Dim str1, str2, str3, str4 As New String("asdf")
     Dim int1, int2, int3, int4 As New Integer
    

提交回复
热议问题