public static GetProcessIfRunning ( string processName ) : System.Diagnostics.Process | ||
processName | string | |
return | System.Diagnostics.Process |
public static System.Diagnostics.Process GetProcessIfRunning(string processName)
{
var processes = System.Diagnostics.Process.GetProcessesByName(processName);
return processes.Length >= 1 ? processes[0] : null;
}