Just get the lines from the array:
string[] dates = line.Split(','); string x = dates[0]; string y = dates[1];
If there can be more than one comma, you must indicate that you want only two lines:
string[] dates = line.Split(new char[]{','}, 2);
Another option is to use string operations:
int index = lines.IndexOf(','); string x = lines.Substring(0, index); string y = lines.Substring(index + 1);
Guffa
source share