title: Proper usage of Environment.ExitCode = -1
body: <p>I am developing a .NET Console Application and keep seeing where another developer has used <code>Environment.ExitCode = -1;</code> in their catch statements. I have read the answer <a href="https://stackoverflow.com/a/155619/11410397">here</a> and was satisfied to discover </p>
  
  <blockquote>
    <p>You can set the exit code using properties: Environment.ExitCode = -1;. This will be used if nothing else sets the return code or uses one of the other options above).</p>
  </blockquote>
  
  <p>Again the link I have placed above is not the same question this is a question regarding method usage not about how to set the code.</p>
  
  <p>To my understanding this is stating that if no other exit code has been provided and no other exit method is given -1 is used. If I am wrong on that assumption it would be great to get clarification.</p>
  
  <p>Which leaves me with wondering if this would be the same as calling <code>Environment.Exit(-1);</code>? 
  In both cases the ExitCode is being set to -1 to be reported to the operating system. Is reporting it directly by calling <code>Environment.Exit(-1);</code> undermining the ability of <code>Environment.ExitCode = -1;</code>? </p>