I have a trivial console application in .NET. It's just a test part of a larger application. I'd like to specify the "exit code" of my console application. How do I do this?
3 options:
Main
int
Environment.Exit(code)
Environment.ExitCode = -1;
Depending on your application (console, service, web app, etc) different methods can be used.
2.1m questions
2.1m answers
60 comments
57.0k users