I can write a 1-d string array to file with:

Dim test() As String = {1, 2, 3, 4, 5}
File.WriteAllLines("C:\MyFile.txt", test)

but can't see how to write a 2-d array to file.

I've tried this:

Dim test(,) As String = {{1, 2, 3, 4, 5}, {34, 22, 12, 33, 55}}
Dim myfile = File.CreateText("C:\MyFile.txt")
Dim row, col As Integer
For row = 0 To 1
For col = 0 To 4
myfile.WriteLine(test(row, col))
Next
Next

which produces a file of 0 bytes.

What should I be doing?