I've written a C# application which uses System.Diagnostics.Process
class to create a process, using
Process P1 = new Process();
P1.FileName = "myexe.exe";
and other proper settings.
I've linked it to an exe file which runs for about 10 minutes. (I'm writing program to measure run-time of programs). Now in between I want to abort the running process. So I wrote in the cancel button's event,
Process.Close();
But in the task manager I still see myexe.exe running, it doesn't get aborted. What to do?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…