About 54 results
Open links in new tab
  1. c# - What is the best way to implement a "timer"? - Stack Overflow

    What is the best way to implement a timer? A code sample would be great! For this question, "best" is defined as most reliable (least number of misfires) and precise. If I specify an interval of 15

  2. How to use class System.Timers.Timer in C# - Stack Overflow

    You shouldn't use System.Windows.Timer with any UI components (e.g. rtbMsg.AppendText is likely access some sort of windows control), System.Timer.Elapsed is called on a non UI thread and will …

  3. How do you add a timer to a C# console application?

    How do you add a timer to a C# console application? It would be great if you could supply some example coding.

  4. c# - How to use the .NET Timer class to trigger an event at a specific ...

    Dec 25, 2010 · Note that if you use a System.Threading.Timer, the callback specified by TimerCallback will be executed on a thread pool (non-UI) thread—so if you're planning on doing something with …

  5. timer - Crear temporizador en C# - Stack Overflow en español

    Estoy creando un programa en C# que me ayude a recordar cuando tomar mis medicinas. Para ello me pregunta si he tomado la pastilla y si es sí reinicial el programa 48 horas después. De momento he ...

  6. C# and how to use "System.Timers" - Stack Overflow

    Jan 29, 2020 · I recently started to use C# and I wanted to use timers. I read Windows help about how to declare and define a Timer. What I don't understand is why I need the Console.ReadLine(); line to …

  7. c# - Why there are 5 Versions of Timer Classes in .NET? - Stack Overflow

    Why are there five timer classes in the .Net framework, namely the following: System.Timers.Timer System.Threading.Timer System.Windows.Forms.Timer System.Web.UI ...

  8. c# - How do timers work in .NET? - Stack Overflow

    Oct 2, 2013 · 12 You should use System.Timers.Timer Add a method that will handle the Elapsed event and execute the code you want. In your case: ... Here is a good post regarding the difference …

  9. .net - Which C# Timer? - Stack Overflow

    May 8, 2014 · Don't use System.Windows.Forms.Timer - This one will run the delegate on a form's UI thread, which is probably not what you want. System.Timers.Timer derives from …

  10. Implementing a loop using a timer in C# - Stack Overflow

    I have two types of timers in C# .NET for this System.Timers and Threading.Timers . Which one will be better to use and how.I don't want to add extra time consumption or threading issues with the timer.