Answers for "how to exit program by c# code"

C#
1

exit programm c#

Application.Exit();
Posted by: Guest on September-14-2020
1

exit programm c#

if (System.Windows.Forms.Application.MessageLoop) 
{
    // WinForms app
    System.Windows.Forms.Application.Exit();
}
else
{
    // Console app
    System.Environment.Exit(1);
}
Posted by: Guest on March-15-2022

C# Answers by Framework

Browse Popular Code Answers by Language