

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the C# equivalent for the Java System.exit(0)?
The C# equivalent for Java System.exit(0) is −
Environment.Exit(exitCode);
The Environment.Exit() method terminates this process and returns an exit code to the operating system.
Above, use exitCode as 0 (zero) to show that the process completed successfully.
Use exitCode as a non-zero number to show an error, for example −
Environment.Exit(1)
Return a value 1 to show that the file you want is not present
Environment.Exit(2)exit
Return a value 2 to indicate that the file is in an incorrect format.
- Related Questions & Answers
- Difference Between exit(0) and exit(1)
- What is the equivalent of C# namespace in Java?
- What is the Certainty Equivalent Method?
- What is the C# equivalent to Java's isInstance()?
- What is the Java equivalent to MySQL's smallint?
- What is the equivalent of Java static methods in Kotlin?
- What is Python equivalent of the ! operator?
- What is the MySQL SELECT INTO Equivalent?
- What is the C++ equivalent of sprintf?
- What is the operating system?
- What is the Information System?
- What is the equivalent of Java static final fields in Kotlin?
- What is the equivalent of Java long in the context of MySQL variables?
- What is the equivalent of EXCEPT in MySQL?
- What is the PHP stripos() equivalent in MySQL?
Advertisements