<p>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?</p>

```
```
int code = 2;
Environment.Exit( code );
```
```