I’m using the Process Class to start processes, but don’t ever want more than one instance of any program to be running.
Looking at the documentation, there are lots of likely-looking properties, but nothing that stands out as the most obvious.
What’s the best way to determine if a process is running?
Edit: John Fisher is right: it’s an existing application that I’m starting and I’m unable to modify it.
You can call this method
and loop through the result (a collection of type Process) to see if the name matches. Something like this: