UsageWriterWriteDefaultValue Method

Writes the default value of an argument.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
protected virtual void WriteDefaultValue(
	Object defaultValue
)

Parameters

defaultValue  Object
The default value.

Remarks

The base implementation writes a string like " Default value: value.", including the leading space.

This method is called by the base implementation of the WriteArgumentDescriptionBody(CommandLineArgument) method if the IncludeDefaultValueInDescription property is and the CommandLineArgumentDefaultValue property is not .

If the CommandLineArgumentAttributeDefaultValueFormat property for the argument is not , then the base implementation of the WriteArgumentDescriptionBody(CommandLineArgument) method will use the formatted string, rather than the original default value, for the defaultValue parameter.

The default implementation formats the argument using the culture specified by the CommandLineParserCulture property, rather than the culture used by the output Writer, so that the displayed format will match the format the user should use for argument values.

See Also