An important question ask here is:
Why do you want to restart the Application when it is your own code that closes (evidently) the Main Form which (in a WinForm app) terminates the Application ?
Why close the Application/Form if you want to keep it "alive" ?
Why not do something like write an EventHandler for the Main Form 'Closing Event: and give the user the choice to quit the Application, or keep going ?
private void Form1_FormClosing(object sender, FormClosingEventArgs e)
{
if (
MessageBox.Show(
"Quit the Application ?",
"Do you really want to quit ?",
MessageBoxButtons.YesNo,
MessageBoxIcon.Warning,
MessageBoxDefaultButton.Button2)
== DialogResult.No)
{
e.Cancel = true;
}
}