Application.Exit() ... how do I send a return code upon exit.
Posted on 2006-04-03
I am new to C# and I want to:
Create a Windows Forms Application that will send back a return code on exit, so that another application can receive an indication that it ran sucessfully or not.
I am trying to set the exit code before I call application exit, but it does not seem to work ...
System.Environment.ExitCode = 9;
What am I missing?
PS - I am not using a Console application, because I need to invoke a form for the user to interact with.