code to close a windows form c# code example
Example 1: how to exit a program in c#
Application.Exit();
Example 2: how to close a form c#
this.Close();
Example 3: c# program exit
System.Windows.Forms.Application.ExitThread( )
Application.Exit();
this.Close();
System.Windows.Forms.Application.ExitThread( )