public Object? DefaultValue { get; set; }
Public Property DefaultValue As Object
Get
Set
Dim instance As CommandLineArgumentAttribute
Dim value As Object
value = instance.DefaultValue
instance.DefaultValue = value
public:
property Object^ DefaultValue {
Object^ get ();
void set (Object^ value);
}
The DefaultValue property will not be used if the IsRequired property is true, or if the argument is a multi-value or dictionary argument, or if the CommandLineArgumentAttribute attribute was applied to a method.
By default, the command line usage help generated by CommandLineParser.WriteUsage(UsageWriter) includes the default value. To change that, set the IncludeDefaultInUsageHelp property to false, or to change it for all arguments set the UsageWriter.IncludeDefaultValueInDescription property to false.
The default value can also be set by using a property initializer. When using the GeneratedParserAttribute attribute, a default value set using a property initializer will also be shown in the usage help, as long as it's a literal, enumeration value, or constant. Without the attribute, only default values set with the DefaultValue property are shown in the usage help.