How to make C# application crash

后端 未结 12 2180
渐次进展
渐次进展 2020-12-31 13:00

I want to test if my application crash dump can be debugged. But firstly, I need to generate a crash dump of my application. I\'m using C# to code my app, and have tried wit

12条回答
  •  臣服心动
    2020-12-31 13:43

    Use below code to close the application.

    Environment.Exit(1);    
    

    Exit needs a parameter called exitcode. If exitcode=0 means there was no error. Supply a non-zero exit code to to reflect an error.

提交回复
热议问题