How do I restart a WPF application?

Hooch picture Hooch · Jan 23, 2011 · Viewed 77.2k times · Source

How can I restart a WPF Application? In windows Forms I used

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

How to do it in WPF?

Answer

Hooch picture Hooch · Jan 23, 2011

I found this: It works. But. Is there any better way?

System.Diagnostics.Process.Start(Application.ResourceAssembly.Location);
Application.Current.Shutdown();