用Stopwatch测试程序执行性能时间
System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); stopwatch.Start(); //中间执行测试的代码 stopwatch.Stop(); stopwatch.ElapsedMilliseconds.ToString(); //时间结果
量的积累到质的飞越
System.Diagnostics.Stopwatch stopwatch = new System.Diagnostics.Stopwatch(); stopwatch.Start(); //中间执行测试的代码 stopwatch.Stop(); stopwatch.ElapsedMilliseconds.ToString(); //时间结果