string[] str1 = { "abc", "bcd", "cde", "efg" }; string str2 = string.Join(",", str1); string str3 = string.Join("_", str1); Console.WriteLine("str2: {0} str3: {1}" , str2, str3); Console.ReadKey();
输出结果:
string[] str1 = { "abc", "bcd", "cde", "efg" }; string str2 = string.Join(",", str1); string str3 = string.Join("_", str1); Console.WriteLine("str2: {0} str3: {1}" , str2, str3); Console.ReadKey();
输出结果: