using System;
using System.Collections.Generic;
using System.Linq;
class C
{
public static void Main()
{
var a = new []{
"First", "Second", "Third"
};
System.Console.Write(string.Join(",", a));
}
}
// In this case we are using a list. You can also use an array etc..
List<string> items = new List<string>() { "WA01", "WA02", "WA03", "WA04", "WA01" };
(b) Join the IEnumerable Together into a string:
// Now let us join them all together:
string commaSeparatedString = String.Join(", ", items);
// This is the expected result: "WA01, WA02, WA03, WA04, WA01"