What is the C# equivalence for the JAVA `System.exit(0);`?

Viewed 45576

What is the C# equivalence for System.exit(0); ?

Thanks

2 Answers

You can use Environment.Exit(0) instead. Note that this is somewhat more complicated than Java due to some permissions issues, but in general this is the symmetrical equivalent.

You can read more about the possible Exceptions thrown in the linked documentation.

Related