I\'m trying to read a text file which contains numbers separated by a comma. When I read using File.Readline()
I get it to a string[]
. I need to conver
I think this is what you want to do. Only thing is that your vallArr should be a two dimensional array that can keep all values. Something like var valArr = new Int64[x, y];
while ((line = sr.ReadLine()) != null)
{
string[] values = line.Split(new string[] { " , " }, StringSplitOptions.None);
for (int i = 0; i < values.Length; i++)
{
valArr[LineCount, i] = Int64.Parse(values[i]);
}
LineCount++;
}