Environment.Exit in .NET doesn't work...
I'm trying to use Environment.Exit to exit my Windows Forms app with a specific exit code, but I can't get it to exit with anything besides 0. The ExitTest sample from the MSDN documentation does not work. When I run that sample with a command-line param of 47, it output that it will return 2F, but the debugger reports, "ExitTest.exe' has exited with code 0 (0x0)"
Have you tried running it without the debugger?
Giampiero De Ciantis
Why aren't you just returning the value out of Main instead? :)
Brad Wilson (dotnetguy.techieswithcats.com)
Fog Creek Home