gsscoder / commandline

Terse syntax C# command line parser for .NET with F# support

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Consider alternative syntax

Korporal opened this issue · 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...