C# – how do you stop a timer?

If you are using System.Timers.Timer stopping is performed by one of the options:

//options 1
timer.Enabled = false
//option 2
timer.Stop()

if you are using System.Threading.Timer, use this method

timer.Change(Timeout.Infinite , Timeout.Infinite)

if you are using System.Windows.Forms.Timer, use this method

timer.Stop(); 

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)