I'm using VS 2017 C# windows forms.I have a 2D array:
string[,] bigData = new string[32,25];
I'm trying to read value form txt for the array:
string input = File.ReadAllText(@"c:\bigData.txt");int i = 1;
int j = 1;
foreach(var row in input.Split('\n'))
{
j = 1;
foreach(var col in row.Trim().Split(' '))
{
bigData[i,j] = col.Trim();
j++;
}
i++;
}
(the bigdata.txt is filled with numbers)
something is bad,after reading the array is full of 0.
What is wrong?