rspec/rules/S1147/csharp/rule.adoc

14 lines
395 B
Plaintext
Raw Normal View History

2020-12-23 14:59:06 +01:00
Calling ``Environment.Exit(exitCode)`` or ``Application.Exit()`` terminates the process and returns an exit code to the operating system..
2020-06-30 12:47:33 +02:00
Each of these methods should be used with extreme care, and only when the intent is to stop the whole application.
== Noncompliant Code Example
----
Environment.Exit(0);
Application.Exit();
----
== Exceptions
2020-12-23 14:59:06 +01:00
These methods are ignored inside ``Main``.