What is the correct syntax for this:
IList names = \"Tom,Scott,Bob\".Split(\',\').ToList().Reverse();
What am I
I realize that this question is quite old, but I had a similar problem, except my string had spaces included in it. For those that need to know how to separate a string with more than just commas:
string str = "Tom, Scott, Bob";
IList names = str.Split(new string[] {","," "},
StringSplitOptions.RemoveEmptyEntries);
The StringSplitOptions removes the records that would only be a space char...