How do i return a non-zero exit code from a Windows Forms application.
Application.Exit() is the preferred way to exit the application, but there is no exit code argumen
If your main method returns a value you can return the exit code there. Otherwise you can use Environment.ExitCode to set it.
main