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);