Timer Classes in the .NET
| |
System.Windows.Forms |
System.Timers |
System.Threading |
| Timer event runs on what thread? |
UI thread |
UI or worker thread |
Worker thread |
| Instances are thread safe? |
No |
Yes |
No |
| Familiar/intuitive object model? |
Yes |
Yes |
No |
| Requires Windows Forms? |
Yes |
No |
No |
| Metronome-quality beat? |
No |
Yes* |
Yes* |
| Timer event supports state object? |
No |
No |
Yes |
| Initial timer event can be scheduled? |
No |
No |
Yes |
| Class supports inheritance? |
Yes |
Yes |
No |
| * Depending on the availability of system resources (for example, worker threads) |
|||
Posted by admin on May 25 2009 in .net Windows Service
