Splitting text file into 2D array
问题 this is the text file that i want to split into a 2D array "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 and this is the code I have implemented to do this but it won't work 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