Equivalent to array () in VB.NET?

In VB6, you can do this:

Dim a As Variant a = Array(1, 2, 3) 

Can you do a similar thing in VB.NET with certain types, for example ?:

 Dim a() As Integer a = Array (1, 2, 3) 
+7
vb6
source share
2 answers
 Dim a() As Integer = New Integer() {1, 2, 3} 
+13
source share

If you are new to .NET, you might want to learn about the List collection and its flexibility, which will give you relatively sorting, filtering and iteration .

0
source share

All Articles