public static void Main(string[] args) { string errorMessage; CommandLineInfo commandLine = new CommandLineInfo(); if (!CommandLineHandler.TryParse( args, commandLine, out errorMessage)) { Console.WriteLine(errorMessage); DisplayHelp(); } if (commandLine.Help) { DisplayHelp(); } else { if (commandLine.Priority != ProcessPriorityClass.Normal) { // Change thread priority } } // ... }
public static void Main(string[] args) { CommandLineInfo commandLine = new CommandLineInfo(); if (!CommandLineHandler.TryParse( args, commandLine, out string?errorMessage)) { Console.WriteLine(errorMessage); DisplayHelp(); } else if (commandLine.Help || string.IsNullOrWhiteSpace(commandLine.Out)) { DisplayHelp(); } else { if (commandLine.Priority != ProcessPriorityClass.Normal) { // Change thread priority } Console.WriteLine( @$ "Running { Path.GetFileName(Environment.GetCommandLineArgs()[0])} /Out:{