Option 1
If you have an array of string
s, then you can use String.Join
:
string[] values = ...;
string concatenated = string.Join(",", values);
Option 2
If you're dealing with an array of any other type and you're using .NET 3.5 or above, you can use LINQ:
string concatenated = string.Join(",",
values.Select(x => x.ToString()).ToArray());
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…