2020-03-26 每日一例第18天
1)使用"+"拼接string字符串
string str = string.Empty;
str = "a";
str = str + "b";
str = str + "c";
str = str + "d";
str = str + "e";
Console.WriteLine(str);
Console.ReadKey();
2)使用stringbuilder对象拼接字符串
StringBuilder sb = new StringBuilder();
sb.Append("a");
sb.Append("b");
sb.Append("c");
sb.Append("d");
sb.Append("e");
sb.Append("f");
Console.WriteLine(sb);
Console.ReadKey();