I\'m maintaining a number of console applications at work and one thing I\'ve been noticing in a number of them is that they call Environment.Exit(0).
A sample progr
Basically the statement Environment.Exit(0)
tells the Operating system that this is a "clean" exit. There are other numbers as well each with a different meaning like Environment.Exit(1)
However one thing to note is that the "Main" has been declared as returning nothing "void", so the exit code will really not have a meaning to it.
Just in case you wanted to know more about the different exit codes have a look here
system Error Codes