With Python, I usually check the return value. And, if there is an error, I use sys.exit()along with the error message.
sys.exit()
What is the equivalent action in C #?
Q1: In C #, you need to use System.Console.xxx to access streams for input, output and error: System.Console.Error is a standard error that you can write.
http://msdn.microsoft.com/en-us/library/system.console.aspx
Q2: exit with:
System.Environment.Exit( exitCode );
http://msdn.microsoft.com/en-us/library/system.environment.exit.aspx
Q3: , # () ( , Exception), .
, main() try... catch:
class App { public static void Main(String[] args) { try { <your code here> } catch(Exception exc) { <exception handling here> } finally { <clean up, when needed, here> } } }
, .
, ..NET , .
Source: https://habr.com/ru/post/1791549/More articles:int main (); C - Java equivalent - javahttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1791545/using-reactives-to-merge-chunked-messages&usg=ALkJrhhNeTAs0T19KzThohVUMM_rbxJF3QVBScript to create a local account and add it to the administrator group used to work before logging out / logging in to test the new account: - vbscriptQuestions for iPhone Developers - iosDoes Mercurial Conditional% include? - mercurialHow to change search text in vim? - vimКак сохранить пары имя-значение в среде Tomcat? - javaHow to access a variable from another class without creating a new instance - javaЗначение JSF потеряно после отказа проверки - file-uploadCalling multithreaded (openmp) C ++ - routines from Fortran program - c ++All Articles