WPF Application exit code

前端 未结 6 835
悲&欢浪女
悲&欢浪女 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:10

    override the OnExit method, and in the ExitEventArgs you can set that value.

     protected override void OnExit(ExitEventArgs e)
     {
          e.ApplicationExitCode = your_value;
     }
    

提交回复
热议问题