How to use Timers in .NET
Excerpts From: http://msdn.microsoft.com/msdnmag/issues/04/02/TimersinNET/default.aspx
There are three different timer classes in the .NET Framework Class Library: System.Windows.Forms.Timer, System.Timers.Timer, and System.Threading.Timer. The first two classes appear in the Visual Studio® .NET toolbox window, allowing you to drag and drop both of these timer controls directly onto a Windows Forms designer or a component class designer. If you're not careful, this is where trouble can begin.System.Windows.Forms.Timer will not raise events that occur while the UI thread is unable to process them, whereas System.Timers.Timer will queue them to be processes when the UI thread is available.
the instances of System.Threading.Timer are not inherently thread safe, given that it resides in the System.Threading namespace
Powered by Bleezer


0 Comments:
Post a Comment
<< Home