用于准确测量运行时间的方法类:System.Diagnostics.Stopwatch具体使用方法:using System.Diagnostics;Stopwatch stopwatch = new Stopwatch();stopwatch.Start();//需要计算耗时的方法………………………………stopwatch.Stop();//总计运行的时间,精确到毫秒stopwatch.Elapsed.TotalSeconds;