Convert array of integers to comma-separated string
var result = string.Join(",", arr);
This uses the following overload of string.Join
:
public static string Join<T>(string separator, IEnumerable<T> values);
.NET 4
string.Join(",", arr)
.NET earlier
string.Join(",", Array.ConvertAll(arr, x => x.ToString()))