StringBuilderは文字列が多い場合に使用します.速度が速いです.
880 ワード
public static void Main(string[] args)
{
Stopwatch sw = new Stopwatch(); //
StringBuilder str = new StringBuilder();
sw.Start();
for(int i=0 ;i<40000;i++)
{
str.Append(i);
}
str.ToString()
Console.WriteLine(sw.Elapsed);
Console.ReadKey();
}