将数组转成字符串
/// <summary> /// 将数组转成字符串 /// </summary> /// <param name="glue">分隔符</param> /// <param name="pieces">要字符串数组</param> private string Implode(char glue,string[] pieces) { string result = string.Empty; int count = pieces.Length; for (int i = 0; i < count;i++ ) { if(i==0){ result = pieces[i]; }else{ result = result + glue.ToString() + pieces[i]; } } return result; }
原文:http://www.cnblogs.com/hongfei/p/3725655.html