This is a basic split
string yourString = "x1,x2,x3,x4";
string[] parts = yourString.Split(',');
foreach(string s in parts)
Console.WriteLine(s);
I renamed the original variable into yourString
. While it seems that it is accepted in LinqPad as a valid identifier I think that it is very confusing using this name because is reserved