Just Code‎ > ‎

C# Snippet - Concatenate list of strings to one colon-separated string

posted Dec 25, 2012, 2:17 PM by Peter Henell   [ updated Dec 25, 2012, 2:19 PM ]

List<string> strings = new List<string> { "Peter", "Henell", "Wrote", "This" };

string result = String.Join(", ", strings.Select(s => s));

Console.WriteLine(result);

Result:
Peter, Henell, Wrote, This
Comments