how code exit windows form visual studio 2019 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();
}