Dec072009
C#终止进程
OK,什么都不说了,直接上代码!
KillProcess ( “outlook” );
private void KillProcess ( string processName )
{
System.Diagnostics.Process[] procs = System.Diagnostics.Process.GetProcessesByName ( processName );
foreach ( System.Diagnostics.Process procCur in procs )
{
procCur.Kill ( );
procCur.Close ( );
}
}
注意,进程后不要带”.exe“!