Answers for "c# console quit app"

C#
3

c# exit application

// In a console application:
Environment.Exit(0);
// In a WPF application:
Close();
Posted by: Guest on September-16-2020
1

c# exit application

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