Вихід

Environment.Exit(0);

Application.Exit();