I have a C # wpf application, where in the main () method I check for a specific condition, and if it is true, I start another process, however I need to start the process after a certain timeout. So for example:
override OnStartUp() { if(condition == true) { ProcessStartInfo p = new ProcessStartInfo("filePath"); p.Start();
I could use Thread.Sleep (), but this will make the current program sleep. Thus, in other words, I want the current program to terminate immediately, and then the new process starts after 5 seconds.
Thanks!
Is it possible?
source share