Restart application using C#

I don’t think there’s a direct method in WPF like there is in WinForms. However, you could use methods from the Windowns.Form namespace like this: (You might need to add a reference to the System.Windows.Form assembly)

System.Windows.Forms.Application.Restart();

System.Windows.Application.Current.Shutdown();

Leave a Comment