I am trying to set and get the application exit code .
I am trying to do something following :
protected override void OnStartup(StartupEventArgs e)
You can do this in the following ways...
Application.Current.Shutdown(110); Environment.Exit(10); this.Close();
Shoutdown() returns a code. and Exit() also returns an exit code, but Close() only closes the application.