Check out example codes for "stop process c#". It will help you in understanding the concepts better.

Code Example 1

Process[] workers = Process.GetProcessesByName("worker")
foreach (Process worker in workers)
{
     worker.Kill();
     worker.WaitForExit();
     worker.Dispose();
}

Learn ReactJs, React Native from akashmittal.com