Is the Elapsed event of System.Timers.Timer effectively the same as the Tick event of System.Windows.Forms.Timer?
In specific circumstances are there advantages of using one rather than the other?
The other answers provide a lot of detail, but the overriding difference between the two timers you mentioned is that the System.Windows.Forms.Timer
will invoke the callback on the UI thread, whereas the System.Timers.Timer
will use one of the threads from the core thread pool.
Check these links here and here for complete understanding of timers in .Net framework.
There are three types of timers.
I personally prefers System.Timers.Timer
as it's thread-safe.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With