记录程序的运行耗时时间
System.Diagnostics.Stopwatch watch = new System.Diagnostics.Stopwatch(); watch.Start(); //Code watch.Stop(); var mSeconds = watch.ElapsedMilliseconds; Dialog.Write("耗时:" + mSeconds.ToString());
原文:https://www.cnblogs.com/microsoft-zh/p/15092774.html