SyntaxFix
Write A Post
Hire A Developer
Questions
Use Linq, it is a very quick and easy way.
string mystring = "0, 10, 20, 30, 100, 200"; var query = from val in mystring.Split(',') select int.Parse(val); foreach (int num in query) { Console.WriteLine(num); }