We have a utility function, something like this:
public static string Join<T>( string delimiter,
IEnumerable<T> collection, Func<T, string> convert )
{
return string.Join( delimiter,
collection.Select( convert ).ToArray() );
}
Which can be used for joining lots of collections easily:
int[] ids = {1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233};
string csv = StringUtility.Join(",", ids, i => i.ToString() );
Note that we have the collection param before the lambda because intellisense then picks up the collection type.
If you already have an enumeration of strings all you need to do is the ToArray:
string csv = string.Join( ",", myStrings.ToArray() );