Summarizing, there are a few ways to do that.
1) Killing the process, which skip the finalization, error handling etc.:
Process.GetCurrentProcess().Kill();
2) Shutting down current application, which is probably the proper way because it calls the exit events:
Application.Current.Shutdown();
or
this.Shutdown();
(when clled in an instance of App-class)
3) Closing current app (all forms have to be closed/finished earlier):
this.Close();
(when called in an instance of App-class)
4) Exiting the environment, which terminates the app:
Environment.Exit(0);
Also, You may want to read about exit statusses here