list string to list int c# code example
Example 1: string to list c#
var names = "Brian,Joe,Chris";
List<string> result = names.Split(',').ToList();
Example 2: list string to int c#
listofIDs.Select(int.Parse).ToList()
Example 3: convert string to list int c#
var numbers = sNumbers.Split(',').Select(Int32.Parse).ToList();