C# process.start, how do I know if the process ended?

MSDN System.Diagnostics.Process

If you want to know right now, you can check the HasExited property.

var isRunning = !process.HasExited;

If it’s a quick process, just wait for it.

process.WaitForExit();

If you’re starting one up in the background, subscribe to the Exited event after setting EnableRaisingEvents to true.

process.EnableRaisingEvents = true;
process.Exited += (sender, e) => {  /* do whatever */ };

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)