Add support for properties?

Dec 15, 2009 at 5:27 PM

CommandLine.dll currently maps parsed values to fields:

class Options
{
    [Option("i", "input")]
    public string InputFile = null;
}

Do you think that supporting properties can be useful? (Or simply a better design choice?)

E.g.:

class Options
{
    [Option("i", "input")]
    public string InputFile { get; set; }
}

As always your opinions are welcome.

Regards,

Giacomo

 

 

 

Nov 4, 2010 at 1:25 PM

Yes !

I never use fields and I hate to have to do that because I think that it is bad design (even for simple objects like this one), especially since the addition of the syntax "{get; set;}" that allows the developer to create properties really easily without useless extra code.
So supporting properties would be a great feature !

Nov 24, 2010 at 3:44 PM

+1