System.Array contains no definition for ToArray
2 answers
I would do as Raphael says, but if you are not familiar with lambda expressions (the x => .. part), you can use that instead. Both will give you an array of int, Raphaëls example is preferable, but Lambda expressions can be scary when you don't know how they work: P (basically it means "for every line x, do Convert.ToInt32 (x)".
int[] a = s.Split(',').Select(int.Parse).ToArray();
+6
source to share