What is the correct syntax for this:
IList names = \"Tom,Scott,Bob\".Split(\',\').ToList().Reverse();
What am I
If you are trying to
following should work:
string str = "Tom Cruise, Scott, ,Bob | at";
IEnumerable names = str
.Split(new char[]{',', '|'})
.Where(x=>x!=null && x.Trim().Length > 0)
.Select(x=>x.Trim());
Output
Now you can obviously reverse the order as others suggested.