c# exit form code example
Example 1: how to exit a program in c#
Application.Exit();
Example 2: how to close an application in c#
this.Close();
//This only close the current form or window that you are using.
Application.Exit();
this.Close();
//This only close the current form or window that you are using.