About 7,840,000 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. c# - How to use the .NET Timer class to trigger an event at a specific ...

    Dec 25, 2010 · 7 .NET has lots of timer classes, but they all take time spans relative to the current time. With a relative time, there are lots of things to consider before you start your timer and to monitor for …

  4. 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 ...

  5. 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 ...

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

    May 8, 2014 · System.Timers.Timer derives from System.ComponentModel.Component, and so its geared towards a design surface. System.Threading.Timer is best for background tasks on a thread …

  7. c# - Add timer to a Windows Forms application - Stack Overflow

    Jul 17, 2009 · I want to add a timer rather than a countdown which automatically starts when the form loads. Starting time should be 45 minutes and once it ends, i.e. on reaching 0 minutes, the form …

  8. Does a System.Timers.Timer elapse on a separate thread?

    Jul 15, 2024 · Complicating things further, "The System.Timers.Timer class provides an easy way to deal with this dilemma—it exposes a public SynchronizingObject property. Setting this property to an …

  9. 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.

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

    while(timer < X seconds) { //do something } 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 …