c sharp console exit code example
Example 1: how to exit application c# console
System.Environment.Exit(0);
// or
Environment.Exit(0);
Example 2: c# exit console
Environment.Exit(0);
System.Environment.Exit(0);
// or
Environment.Exit(0);
Environment.Exit(0);