This post will discuss how to split a delimited string into a List in C#.

In LINQ, you can use the String.Split() method to break a delimited string into substrings based on the specified delimiter. To convert the resultant string array into a list, you may call the ToList() method.

Download  Run Code

 
The above solution returns a list of strings. To convert each string into an integer, invoke the Enumerable.Select() method before ToList() method.

Download  Run Code

 
Another option to convert an array to a list of a different type is using the Array.ConvertAll() method. The following code example demonstrates its usage. Note that the solution uses a List constructor for converting the array into a list:

Download  Run Code

That’s all about splitting a delimited string into a List in C#.