how to ext windows form app code example
Example 1: how to close an application in c#
this.Close();
//This only close the current form or window that you are using.
Example 2: close windows web forms application c#
Application.Exit(); //It needs to be upercase...