示例#1
0
        internal static void ProcessKillByName(string name)
        {
            int[] pids = ProcessManagement.GetProcessIdsByName(name); // Gets all running processes id by name

            foreach (int pid in pids)                                 //Iterates through each process id to terminate it
            {
                ProcessManagement.TerminateProcessById(pid);
            }
        }
示例#2
0
 internal static void ProcessKillById(int id)
 {
     ProcessManagement.TerminateProcessById(id);
 }