also you can use this Extension method
public static List<int> SplitToIntList(this string list, char separator = ',')
{
return list.Split(separator).Select(Int32.Parse).ToList();
}
usage:
var numberListString = "1, 2, 3, 4";
List<int> numberList = numberListString.SplitToIntList(',');