When you have a list of strings like IList
List<string> list = new List<string>() { "A" , "B", "C", "D", "E" };
string commaSeparated = String.Join(",", list.ToArray());
The output will be like this:
A,B,C,D,E
This is an easy and clean way to create a delimiter separeated list of strings.
No comments:
Post a Comment