foreach (Process p in Process.GetProcesses(System.Environment.MachineName)) { if (p.MainWindowHandle != IntPtr.Zero) p.Kill(); }
GetProcessesByName
foreach (Process p in Process.GetProcessesByName("explorer")) { //p.Kill(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)