Check out example codes for "check if process is open c#". It will help you in understanding the concepts better.

Code Example 1

Process[] proc = Process.GetProcessesByName("chrome");
if (proc.Length == 0) {
  // run whatever here if process is NOT open
}
else {
  // run whatever here if process is open
}

Learn ReactJs, React Native from akashmittal.com