How to make a timer which forces the application to close at a specified time in C#? I have something like this:
void myTimer_Elapsed(object sender, System.
Task.Delay(9000).ContinueWith(_ => { this.Dispatcher.Invoke((Action)(() => { this.Close(); })); } );