C# – the command to exit a Console application in C#

cconsole-applicationexit

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

Best Answer

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

Environment.Exit(0) is cleaner.