Application.Current.Shutdown() doesn't

前端 未结 3 1752
悲哀的现实
悲哀的现实 2020-12-31 20:18

Title\'s about it. WPF app with some WCF stuff for IPC. I call Application.Current.Shutdown() and the app continues on happily. I thought Shutdown

3条回答
  •  攒了一身酷
    2020-12-31 20:54

    I only experience Application.Current.Shutdown not working when I'm running from Visual Studio. Within Visual Studio (at least the 2010 version I'm using) Application.Current.Shutdown doesn't do a thing. If I single step through it executes this line and then continues. If I run the program (as an .exe) from Windows Explorer then Application.Current.Shutdown works fine.

    There is probably an explanation for this since during debug other threads are active, but I can't explain it.

提交回复
热议问题