1) Convert all the comma separated numbers in a string to list of int.
e.g. string numbers = "1,2,3";
Covert above numbers to list of int
var list = Array.ConvertAll<string, int>(numbers.Split(','), Convert.ToInt32);
Above solution works well till the time it is just comma separated numbers. If you add trailing comma or any other character in this string, it will throw exception.
For example:
string numbers = "1,2,3,";
OR
string numbers = "1,a,3";