Skip to main content
Post Closed as "Duplicate" by Mong Zhu, EpicKip, Clemens c#
edited tags
Link
Cid
  • 15.3k
  • 4
  • 33
  • 49
Source Link
Codey
  • 527
  • 2
  • 12
  • 34

Environment.Exit doesn't close

I have exit command:

void CloseMethod() { //Application.Current.Shutdown(); Environment.Exit(0); } 

The problem is that when I click the button it hides the GUI but I still see the app open at the task manager same with Application.Current.Shutdown();