Louis Rhys
Louis Rhys

Reputation: 35637

How to exit a program with an exit code: C#

How to exit a program with an exit code in C#? In java it would be System.exit(int code);

Upvotes: 10

Views: 3373

Answers (1)

Tim Robinson
Tim Robinson

Reputation: 54714

Either:

Returning a value from Main is a little nicer than exiting the process in the middle of a method, but this is presumably the same advice that applies to Java, C or C++.

Upvotes: 14

Related Questions