little-sharps / args

Command line argument parser for .NET

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Args Parsing Fails for Boolean as last arg

dunnry opened this issue · comments

Given a argument model like so:

class Args
{
public bool Enabled {get; set;}
public string Foo {get; set; }
}

And given the two command lines

  1. program.exe -enabled -foo somevalue
  2. program.exe -foo somevalue -enabled
    #1 will parse correctly and Enabled will be true. #2 will always show Enabled false.

Sorry, this was true in 1.0.2 and fixed in 1.0.3. The updates in NuGet are not always that clear. I thought I had the latest version. This is fixed.