Creating a comma separated list from IList or IEnumerable
.NET 4+ IList<string> strings = new List<string>{“1″,”2″,”testing”}; string joined = string.Join(“,”, strings); Detail & Pre .Net 4.0 Solutions IEnumerable<string> can be converted into a string array very easily with LINQ (.NET 3.5): IEnumerable<string> strings = …; string[] array = strings.ToArray(); It’s easy enough to write the equivalent helper method if you need to: public static … Read more