ParseOptionsAutoHelpArgument Property

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

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public bool? AutoHelpArgument { get; set; }

Property Value

NullableBoolean
to automatically create a help argument; to not create one, or to use the value from the ParseOptionsAttribute attribute, or if that is not present, . The default value is .

Remarks

If this property is , the CommandLineParser will automatically add an argument with the name "Help". If using ParsingModeLongShort, this argument will have the short name "?" and a short alias "h"; otherwise, it will have the aliases "?" and "h". When supplied, this argument will cancel parsing and cause usage help to be printed.

If you already have an argument conflicting with the names or aliases above, the automatic help argument will not be created even if this property is .

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

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

See Also