如何使用退出代码退出程序:C#

Lou*_*hys 9 .net c# exit-code exit

如何使用C#中的退出代码退出程序?在java中它会System.exit(int code);

Tim*_*son 12

或者:

返回一个值Main比在方法中间退出过程要好一些,但这可能与适用于Java,C或C++的建议相同.