ParseOptionsAutoVersionArgument Property

Gets or sets a value that indicates a version argument will be automatically added.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public bool? AutoVersionArgument { get; set; }

Property Value

NullableBoolean
to automatically create a version argument; to not create one, or to use the value from the ParseOptionsAttributeAutoVersionArgument property, or if the ParseOptionsAttribute is not present, . The default value is .

Remarks

If this property is , the CommandLineParser will automatically add an argument with the name "Version". When supplied, this argument will write version information to the console and cancel parsing, without showing usage help.

If you already have an argument named "Version", the automatic version argument will not be created even if this property is .

The name and description can be customized by using a custom StringProvider.

If not , this property overrides the value of the ParseOptionsAttributeAutoVersionArgument property.

See Also