ParseOptionsAttributeAutoHelpArgument 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.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public bool AutoHelpArgument { get; set; }

Property Value

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

This value can be overridden by the ParseOptionsAutoHelpArgument property.

See Also