C# – Concat all strings inside a List using LINQ

.net-3.5clinq

Is there any easy LINQ expression to concatenate my entire List<string> collection items to a single string with a delimiter character?

What if the collection is of custom objects instead of string? Imagine I need to concatenate on object.Name.

Best Answer

String.Join(delimiter, list);

is sufficient.