How to exit a wpf application when Application.Current is NULL? -
When I need to exit a WPF application
I usually use I use the application. Current.Shutdown ()
But sometimes Application.Current
is NULL
, I have also tried the environment. Exact (0)
but it is not working correctly. WPF application
is another way to exit specially when Application.Current
is NULL
?
This is my code:
Public Partial Class Application: Application {Safe Override Zero Start (StartupAventErgus E) {If (Some) {Issue ....} else {Application.Current.Shutdown ()}}
system. Diagnostics Process. GateContent Process () Kill ();
Anywhere and at any time it terminates your application immediately.
Comments
Post a Comment