I have a string:
var names = "Brian,Joe,Chris";
Is there a way to convert this to a List<string>
delimited by ,
in one line?
List<string> result = names.Split(new char[] { ',' }).ToList();
Or even cleaner by Dan's suggestion:
List<string> result = names.Split(',').ToList();