c#中使用stopwatch统计代码执行时间

在C#中有一个秒表类:stopwatch,用这个类可以方便的统计一下代码执行时间。要使用stopwatch要先加一个命名空间,System.Diagnostics。
时间:2014-12-14