标签:
1.使用StringBuilder拼接字符串实例:
string[] lines = File.ReadAllLines("sdjk.txt", Encoding.Default);
????????//创建监视对象
Stopwatch watch = new Stopwatch();
StringBuilder str = new StringBuilder();
//监视开始
watch.Start();
for (int i = 0; i < lines.Length; i++)
{
str.Append(lines[i]);
}
//监视结束
watch.Stop();
//显示监视时间
Console.WriteLine(watch.Elapsed);
?
标签:
原文地址:http://www.cnblogs.com/taidou/p/4695665.html