Click or drag to resize

CommandLineArgumentAttributeDefaultValue Property

Gets or sets the default value to be assigned to the property if the argument is not supplied on the command line.

Namespace:  Ookii.CommandLine
Assembly:  Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 2.3.0
Syntax
public Object DefaultValue { get; set; }

Property Value

Type: Object
The default value for the argument. The default value is .
Remarks

The DefaultValue property will not be used if the IsRequired property is , or if the argument is a multi-value or dictionary argument.

By default, the command line usage help generated by WriteUsage(TextWriter, Int32, WriteUsageOptions) does not include the default value. Either manually add it to the description, or set the IncludeDefaultValueInDescription property to .

See Also