You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would expect the default value to not be used unless the option was provided but without a value. Otherwise, it kind of duplicates the functionality of the constructor (but more limited since Attributes may only contain constant values).
For example, when parsing the following class:
public class Config
{
[Option('v', DefaultValue = "Other")]
public string Value { get; set; }
public Config()
{
Value = "Initial";
}
}
I would expect the following:
Program.exe > Value == Initial
Program.exe -v > Value == Other
Program.exe -v Overwrite > Value == Overwrite
The text was updated successfully, but these errors were encountered:
I would expect the default value to not be used unless the option was provided but without a value. Otherwise, it kind of duplicates the functionality of the constructor (but more limited since Attributes may only contain constant values).
For example, when parsing the following class:
I would expect the following:
Program.exe
>Value == Initial
Program.exe -v
>Value == Other
Program.exe -v Overwrite
>Value == Overwrite
The text was updated successfully, but these errors were encountered: