EKsumic's Blog

let today = new Beginning();

Click the left button to use the catalog.

OR

C# Extract the comma separated string to GET the List

It's been a long time since I've been using stupid methods like one-dimensional arrays. C# has always provided some very useful tips. This blog will tell you a very common way to get a list of characters composed of commas and strings.

C# Extract comma separated strings

string s = "11,222,3";
List<string> list = new List<string>(s.Split(','));

The result is

list [0] = 11; list [1] = 222, list [3] = 3

Take notes.

This article was last edited at 2020-10-21 02:31:15

* *