C
Corbett
How can I query a new process to determine if it has started yet? For
example:
using System.Diagnostics;
Process cmd = new Process();
cmd.StartInfo = new ProcessStartInfo();
..
..
..
if (!cmd.HasStarted) Response.Write("The process hasn't started yet");
else Response.Write ("The process is running");
I know the .HasStarted property doesn't exist, but what method can be
used to determine if the process object is running?
The HasExited property returns an Invalid Operation Exception if a
..Start hasn't been issued. I could catch the exception and handle it
that way but I don't like catching exceptions as a way of handling
coding issues.
example:
using System.Diagnostics;
Process cmd = new Process();
cmd.StartInfo = new ProcessStartInfo();
..
..
..
if (!cmd.HasStarted) Response.Write("The process hasn't started yet");
else Response.Write ("The process is running");
I know the .HasStarted property doesn't exist, but what method can be
used to determine if the process object is running?
The HasExited property returns an Invalid Operation Exception if a
..Start hasn't been issued. I could catch the exception and handle it
that way but I don't like catching exceptions as a way of handling
coding issues.