public override void OnDelete() { if (m_Timer != null) { m_Timer.Stop(); } base.OnDelete(); }
private void UserTimer_Elapsed(object sender, ElapsedEventArgs e) { //shows timer message in blue color Console.ForegroundColor = ConsoleColor.Blue; //stops timer UserTimer.Stop(); //lets user know timer has finished Console.WriteLine("\nDing! Your timer has ended."); }