C# 代码笔记

一、使循环不卡

  Application.DoEvents();

  System.Threading.Thread.Sleep(5);


二、计算代码运行时间

  Stopwatch sw = new Stopwatch();

  sw.Start();

  ...

  sw.Stop();

posted @ 2014-02-17 16:41  胡炜  阅读(218)  评论(0编辑  收藏  举报