how to exit application in c# code example
Example 1: how to exit a program in c#
Application.Exit();
Example 2: c# how to exit program
System.Environment.Exit(1);
Example 3: c# application exit
private void button1_Click(object sender, EventArgs e) // this is your button double click your button and you will find it
{
Application.Exit();
}