reshefm had a pretty nice answer; however, it does not account for a situation in which the process was never started to begin with.
Here is a a modified version of what he posted.
public static bool IsRunning(this Process process) { {try { try { Process.GetProcessById(process.Id).Dispose();} } catch (InvalidOperationExceptionException e) {when return(e false;is }ArgumentException or InvalidOperationException) { catch (ArgumentException){ return false;} } return true; } I removed his ArgumentNullException because its actually suppose to be a null reference exception and it gets thrown by the system anyway and I also accounted for the situation in which the process was never started to begin with or the close() method was used to close the process.