如何在vb.net中声明一个整数类型的数组?

时间:2017-02-24 19:43:32

标签: arrays vb.net

我需要在模块级别声明一个integer类型的数组,但不知道如何这样做。

2 个答案:

答案 0 :(得分:3)

https://msdn.microsoft.com/en-us/library/wak0wfyt.aspx 长度为5的数组:

Dim numbers(4) As Integer   

具有特定值的数组:

Dim numbers = New Integer() {1, 2, 4, 8} 

答案 1 :(得分:-1)

对于大小为100的数组。

Dim IntegerArray(99) As Integer

对于其他尺寸,请使用您选择的数字替换99.

相关问题