Splitting text file into 2D array
<p>this is the text file that i want to split into a 2D array</p>

<p><code>"YHOO",36.86,21,13873900,37.00
"GOOG",684.11,1114,1821650,686.72
"MSFT",50.54,3993,31910300,50.65
"AAPL",94.40,28201,39817000,94.26
</code></p>

<p>and this is the code I have implemented to do this but it won't work</p>

<pre><code> String input = File.ReadAllText(@"..\..\Data\stockInfo.txt");

        int i = 0, j = 0;
        string[,] result = new string[3, 5];
        foreach (var row in input.Split('\n'))
        {
            j = 0;
            foreach (var col in row.Trim().Split(','))
            {
                result[i, j] = string.Parse(col.Trim());
                j++;
            }
            i++;
        }
</code></pre>