gsscoder/commandline

Consider alternative syntax

Korporal opened this issue · 0 comments

Hi,

Consider this generic approach, I think it's better for developers, simpler pattern:

static void Main(string[] args) {
  
    var options = CommandLine.Parser.Default.ParseArguments<Options>(args);

    if (options.Available)
       // Values are available here
       if (options.Verbose) Console.WriteLine("Filename: {0}", options.InputFile);
 
}

just a thought...