What is the command to exit a Console application in C#?

Sababoni picture Sababoni · Apr 23, 2012 · Viewed 375.4k times · Source

What is the command in C# for exit a Console Application?

Answer

Nikhil Agrawal picture Nikhil Agrawal · Apr 23, 2012

You can use Environment.Exit(0); and Application.Exit

Environment.Exit(0) is cleaner.