private ParseArguments ( string args ) : void | ||
args | string | |
Результат | void |
public static void Main(string[] args) { Environment.ExitCode = 1; try { var program = new Program(); program.ParseArguments(args); if (program.ShowHelp) { ShowUsage(); } else { program.Run(); } Environment.ExitCode = 0; } catch (Exception exception) { Console.WriteLine("ERROR: {0}", exception.Message); } }
public static void Main(string[] args) { Environment.ExitCode = 1; try { var program = new Program(); program.ParseArguments(args); if (program.ShowHelp) { ShowUsage(); } else { program.Run(); } Environment.ExitCode = 0; } catch (Exception exception) { Console.WriteLine("ERROR: {0}", exception.Message); } }
public static void Main(string[] args) { Environment.ExitCode = 1; try { var program = new Program(); program.ParseArguments(args); if (program.ShowHelp) { ShowUsage(); } else { program.Run(); } Environment.ExitCode = 0; } catch (Exception exception) { Console.WriteLine("ERROR: {0}", exception.Message); if (exception.InnerException == null) { return; } while (exception.InnerException != null) { exception = exception.InnerException; } Console.WriteLine("Error (InnerException): {0}", exception.Message); } }