visual studio exit button close window code example
Example: visual studio windows form exit button
private void btnExitProgram_Click(object sender, EventArgs e)
{
Application.Exit();
}
private void btnExitProgram_Click(object sender, EventArgs e)
{
Application.Exit();
}