I have tried
below code after submitting the data but application gets crashed while
restarting the application.
if (Restart (Condition))
{
System.Windows.Application.Current.Shutdown();
Process MyProcess = new Process();
MyProcess.StartInfo.FileName = Application.ResourceAssembly.Location;
MyProcess.Start();
return;
}
Application.Current.Exit += new ExitEventHandler(Current_Exit);
Application.Current.Shutdown();
void Current_Exit(object sender, ExitEventArgs e)
{
Process.Start(Application.ResourceAssembly.Location);
}
No comments:
Post a Comment