WPF Application exit code

前端 未结 6 827
悲&欢浪女
悲&欢浪女 2020-12-17 15:39

I am trying to set and get the application exit code .

I am trying to do something following :

protected override void OnStartup(StartupEventArgs e)
         


        
6条回答
  •  粉色の甜心
    2020-12-17 16:18

    It works for me with either method (Environment.ExitCode=110 or Environment.Exit(110)). I hope you are calling the program from the console and not from Visual Studio to then check the ExitCode...

提交回复
热议问题