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
Ezlanding2y ago
Is this a process you started in c# or a random running process
Ezlanding
Ezlanding2y 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
Luizdodibre2y ago
a process that I started
Ezlanding
Ezlanding2y ago
Then useprocess.waitForExit. You can also find a process by PID or name
Luizdodibre
Luizdodibre2y ago
ok thanks