You will need to use a jagged array:
Check that link:
http://msdn.microsoft.com/en-us/library/2s05feca.aspx
Proposed code in (VB.NET):
Imports System.IO
Class Program
Private Shared Sub Main()
Dim line As [String] = "Foo,4,7,12,,6|Bar,4,2,87,5,7|Fly,4,,87,5,7"
Dim rows As [String]() = line.Split("|"C)
Dim matrix As [String]()() = New [String](rows.Length - 1)() {}
For i As Integer = 0 To rows.Length - 1
matrix(i) = rows(i).Split(","C)
Next
Console.WriteLine(matrix(0)(0))
End Sub
End Class
And the code should be something like that (in C#):
using System.IO;
using System;
class Program
{
static void Main()
{
String line = "Foo,4,7,12,,6|Bar,4,2,87,5,7|Fly,4,,87,5,7";
String[] rows = line.Split('|');
String[][] matrix = new String[rows.Length][];
for(int i =0; i<rows.Length; i++) {
matrix[i] = rows[i].Split(',');
}
Console.WriteLine(matrix[0][0]);
}
}