0

I want to restart my application with some condition. But I want to kill the process first. So when I start it again then a new process id should be assigned. How to do this?

I googled it but I can't the find perfect answer.

I had written following code:

Process.Start(Application.ExecutablePath);
Threat.Thread.Sleep(2000);
Environment.Exit(-1);
Blorgbeard
  • 97,316
  • 47
  • 222
  • 267
Jankya
  • 956
  • 2
  • 11
  • 33

0 Answers0