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