ParseOptionsAttributeAutoVersionArgument 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.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public bool AutoVersionArgument { get; set; }

Property Value

Boolean
to automatically create a version argument; otherwise, . 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 .

  Note

The automatic version argument will never be created for subcommands.

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

This value can be overridden by the ParseOptionsAutoVersionArgument property.

See Also