Environment.Exit
and Application.Exit
Environment.Exit(0)
is cleaner.
http://geekswithblogs.net/mtreadwell/archive/2004/06/06/6123.aspx
More Related Contents:
- How can I get the application’s path in a .NET console application?
- Show/Hide the console window of a C# console application
- Custom text color in C# console application?
- Why does closing a console that was started with AllocConsole cause my whole application to exit? Can I change this behavior?
- Error message “CS5001 Program does not contain a static ‘Main’ method suitable for an entry point”
- How do I write characters to the console without line breaks?
- Can’t specify the ‘async’ modifier on the ‘Main’ method of a console app
- Capture console exit C#
- Listen for key press in .NET console app
- Capturing console output from a .NET application (C#)
- How can I validate console input as integers?
- how to run a winform from console application?
- C#: Printing all properties of an object [duplicate]
- How do you clear the console screen in C?
- How can I write fast colored output to Console?
- How to read RegEx Captures in C#
- Startup.cs in a self-hosted .NET Core Console Application
- How to write to Console.Out during execution of an MSTest test
- Why does computing factorial of relatively small numbers (34+) return 0?
- Is there a way to make a console application run using only a single file in .NET Core?
- How do I only allow number input into my C# Console Application?
- How to split string preserving whole words?
- Console.WriteLine and generic List
- ThreadPool not starting new Thread instantly
- Compile to stand alone exe for C# app in Visual Studio 2010
- Converting Color to ConsoleColor?
- Must declare the table variable @table
- How do I get a return value from Task.WaitAll() in a console app?
- System.drawing namespace not found under console application
- C# : Redirect console application output : How to flush the output?