I just switched from MATLAB to visual basic, and need to know how to fill an array using a for loop. This is what I have in visual basic but it's giving me an error. Also if someone could suggest a more efficient way of filling an array, that would be greatly appreciated.
Module Module1
Sub Main()
Dim x(10) As Integer
For i = 1 To x.Length
x(i) = i
Next
Console.WriteLine(x)
Console.ReadLine()
End Sub
End Module