// In a console application:
Environment.Exit(0);
// In a WPF application:
Close();
if (System.Windows.Forms.Application.MessageLoop)
{
// WinForms app
System.Windows.Forms.Application.Exit();
}
else
{
// Console app
System.Environment.Exit(1);
}
System.Environment.Exit(1);
Application.Exit();
System.Windows.Forms.Application.ExitThread( )
private void button1_Click(object sender, EventArgs e) // this is your button double click your button and you will find it
{
Application.Exit();
}
application.exit