Saturday, December 11, 2010

Convert List or Array to String

 
// Sample 1
StringBuilder builder = new StringBuilder();
foreach (string value in array)
{
    builder.Append(value);
    builder.Append(',');
}
// Sample 2
string result = string.Join(",", array);