static void Main(string[] args) { SetTimer = new System.Timers.Timer(10000); SetTimer.Elapsed += OnTimedEvent; SetTimer.Enabled = true; Console.ReadLine(); } private static void OnTimedEvent(Object source, ElapsedEventArgs e) { SetTimer.Enabled = false; MYMethod(); SetTimer.Enabled = true; }
static void Main(string[] args) { SetTimer = new System.Timers.Timer(10000); SetTimer.Elapsed += OnTimedEvent; SetTimer.Enabled = true; string inp; do { inp = Console.ReadLine(); } while (inp != "Q"); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)