c# last execution time of a process and kiling the last process of the same application

jazzIIIlove
jazzIIIlove used Ask the Experts™
on
Hi there;

I am trying to kill a process executed more than 2 times.
when the third one executes, I am able to kill the process but not the third one but the first one.
I checked for pid and it seems pid is not denoting the last execution time of the process.

So, I need to find the last execution time of the same processes and kill the last one.

How can I do this in C#?

Best regards.
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
myProcessObject.StartTime helps to solve this issue.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial