Convert a list to CSV string

Code to convert list of string to CSV
public static string ToCsv(this IEnumerable source)
{
  if (source == null)
    throw new ArgumentNullException("source");
  return string.Join(",", source.Select(s => s.ToString()).ToArray());
}

Be the first to comment on this post.