How to exit from a console application | |||
| |||
using System; namespace ConsoleApplication1 { class Class1 { [STAThread] static void Main(string[] args) { Console.WriteLine("About to exit"); int exitCode = 0; Environment.Exit(exitCode); // This line is not executed. Console.WriteLine("After exit"); } } } Tags: C# Disable Button How to terminate application | |||
| |||
| |||
Login for comment |