Given a list of strings, what is the best method for concatenating these strings into a comma separated list with no comma at the end. (VB.NET or C#) (Using either StringBuilder
Does the solution have to use a StringBuilder or the Concat method?
StringBuilder
Concat
If not, you could use the static String.Join method. For example (in C#):
String.Join
string result = String.Join(",", items.ToArray());
See my very similar question for more details on this.