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.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
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