例:结束explorer.exe进程
foreach (System.Diagnostics.Process thisproc in System.Diagnostics.Process.GetProcesses())
{
if(thisproc.ProcessName.Equals(“explorer”))
{
thisproc.Kill();
}
}
foreach (System.Diagnostics.Process thisproc in System.Diagnostics.Process.GetProcesses())
{
if(thisproc.ProcessName.Equals(“explorer”))
{
thisproc.Kill();
}
}