This project is read-only.





Work Items


Sep 18, 2014
3:18 PM

Being evaluated

Hi Trupik,

I changed code in the .NET 4.0 version folder to enable your excellent tool to accept arguments with ONLY longNames set (if you have very many options, or single letters are not meaningful enough).

As you can see I only had to comment out a single test you made in the property of the ShortName. I let the code in, so you can check.

I also modified your testing program to include tests for switch Arguments and value Arguments with only long names set.

Please check (and perhaps also include in folder for .NET framework 2.0?).

I would be delighted if you would publish a new package so I can use it without having to resort to my local codes.

Thanks for your excellent work in CommandlineParser. I enjoy every single time using it!

Best regards,


by SeenDaBean
Jan 2, 2011
4:10 AM

Being evaluated

The current implementation is not capable of using private fields for storage of options nor to attach metadata to them that'll actually be read. As such, I've added BindingFlags to the call to GetFields() in order to bridge that gap. The only concern I have is that this may well be a prohibited call if not running under Full Trust. Insofar as that's the case, I recommend considering changing the implementation to support properties instead of fields. Given the existing code base, it may also be appropriate to support both, perhaps with some intelligence to throw exceptions pertinent to cases where reflecting over private members is prohibited.


View All
  • 1-2 of 2 Patches
    • Previous
    • 1
    • Next
    • Showing
    • All
    • Patches