Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Run only one process .Net
foreach (Process proc in Process.GetProcesses())
if ((proc.ProcessName == Path.GetFileNameWithoutExtension(Application.ExecutablePath)) && (proc.Id != Process.GetCurrentProcess().Id))
proc.Kill();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment