If you are tying to turn a list into a single csv (or anything, doesn't have to be a comma), you can use string.join. The following is an example of collapsing a list into a string separated by new lines.
1 2 3 | List<string> items = new List<string>(); //populate the list string collapsed = string.Join(",\r", items); |
Comments
Post a Comment