Process.WaitForExit Method

 

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.

Namespace:   System.Diagnostics
Assembly:  System (in System.dll)

NameDescription
System_CAPS_pubmethodWaitForExit()

Instructs the Process component to wait indefinitely for the associated process to exit.

System_CAPS_pubmethodWaitForExit(Int32)

Instructs the Process component to wait the specified number of milliseconds for the associated process to exit.

Return to top
Show: