Differences and usages of System.Windows.Forms.Timer, System.Timers.Timer and System.Threading.Timer
http://space.itpub.net/12639172/viewspace-571197
Http://msdn.microsoft.com/en-us/magazine/cc164015.aspx
==================================================
When System.Windows.Forms.Timer executes, if you add a sleep to the middle of the process, the entire interface dies.
But the other two don't have the same situation, System.Timers.Timer, system.threading.timer!.
System.Timers.Timer, System.Threading.Timer These two peacetime use time did not find too big difference, timing accuracy are similar.
General my personal use, or use System.Threading.Timer more, with the method of programming more useful!
System.Windows.Forms.Timer is UI-based
System.Timers.Timer is service-based
System.Threading.Timer is thread-based
In addition to the timer can only be used for the interface, other things do not see the difference
System.Windows.Forms.Timer and WPF. The Timer is single-threaded for too long a time to affect the next trigger accuracy difference
System.Threading.Timer are multi-threaded, a single run time is too long to affect the next trigger
High accuracy
System.Threading.Timer is a simple light-weight timer that uses callback methods and is serviced by thread pool threads. It is not recommended for use with Windows forms because its callbacks do not take place on the user interface thread. System.Windows.Forms.Timer is a better choice for Windows forms. To get the server-based timer feature, consider using System.Timers.Timer, which can raise events and have additional functionality.
The 3 timers are mentioned in "CLR Via C #", but the author says System.Timers.Timer is a System.Threading.Timer, not recommended, but in my Web project Application_ I still use this instead of threading.timer in start, because when I use Threading.timer, I do not execute it once.
For the use of the timer in the B/s structure is more complex, generally we put the timer in the Application_OnStart, so that the global maintenance of a timer, you can regularly back up the database, regular maintenance users and other operations, and the method of writing static, so as not to be garbage collection. It is not recommended to use in the General ASPX page, because the server-side timer is not very meaningful to the user, you can use JS instead. And every request on this page could introduce a new timer, causing the system to crash. In addition, the timer is an ASP. IIS-related, so for important execution tasks, it is recommended to write a service or stand-alone program on the server to execute.
http://blog.itpub.net/12639172/viewspace-571197
System.Windows.Forms.Timer, System.Timers.Timer, System.Threading.Timer differences and when to use