·关于C#中timer类 在C#里关于定时器类就有3个 System.Windows.Forms.Timer是应用于WinForm中的,它是通过Windows消息机制实现的,类似于VB或Delphi中的Timer控件,内部使用API SetTimer实现的。它的主要缺点是计时不精确,而且必须有消息循环,Console Application(控制台应用程序)无法使用。 例: public void theout(object source, System.Timers.ElapsedEventArgs e) |