1 string str = "1,2,3,4,5,6,7"; 2 string[] strArray = str.Split(','); //字符串转数组 3 str = string.Empty; 4 str = string.Join(",", strArray);//数组转成字符串