wait for processes [closed]

I want to wait for a process to close to perform some action how can I do that?
5 Replies
Ezlanding
Ezlanding3y ago
Is this a process you started in c# or a random running process
Ezlanding
Ezlanding3y ago
Process.WaitForExit Method (System.Diagnostics)
Sets the period of time to wait for the associated process to exit, and blocks the current thread of execution until the time has elapsed or the process has exited. To avoid blocking the current thread, use the Exited event. For code examples, see the StandardError and the ExitCode property reference pages.
Luizdodibre
LuizdodibreOP3y ago
a process that I started
Ezlanding
Ezlanding3y ago
Then useprocess.waitForExit. You can also find a process by PID or name
Luizdodibre
LuizdodibreOP3y ago
ok thanks
Want results from more Discord servers?
Add your server