Category Archives: Console

Console App returing ExitCode

      No Comments on Console App returing ExitCode

Console app exit code: int code = 2;Environment.Exit( code );OR Environment.ExitCode = code; enum ExitCode : int { Success = 0, InvalidLogin = 1, InvalidFilename = 2, UnknownError = 10} int Main(string[] args) { return (int)ExitCode.Success;} Refer this link for more info on ExitCodes:http://msdn.microsoft.com/en-us/library/system.environment.exitcode.aspx Optional: Calling from MSBUILD and Looking… Read more »