I know it sounds stupid, but I've tried everything to stop a timer, but the timer won't stop. I'm working on a game and i would appreciate if someone could tell me how to stop a timer.
If you are using System.Timers.Timer
you can stop like this
timer.Enabled = false
if you are using System.Threading.Timer
, use this
timer.Change(Timeout.Infinite , Timeout.Infinite)
Or use
timer.Stop();
if you are using System.Windows.Forms.Timer