close-application
Right way to close WPF GUI application: GetCurrentProcess().Kill(), Environment.Exit(0) or this.Shutdown()
Application.Current.Shutdown() is the proper way to shutdown an application. Generally, because it fires the exit events, that you can handle, further info. Process.GetCurrentProcess().Kill() should be used when you want to kill the application as soon as possible, further info. The nature of those methods is totally different: Shutdown() can be paused to end some operations … Read more