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
  • 101,031
  • 48
  • 228
  • 272
Jankya
  • 966
  • 2
  • 12
  • 34

0 Answers0