Difference between Environment.Exit and simple return 2 from Main

后端 未结 3 1682
刺人心
刺人心 2021-02-12 17:31

From outside of the application, is there any difference between

...
Environment.Exit(2)

and

static int Main()
{
    ...
    re         


        
3条回答
  •  渐次进展
    2021-02-12 18:08

    Environment.Exit(2) can be used everywhere. return 2 only within the Main() function.

提交回复
热议问题