ParseOptionsAttributeDefaultArgumentCategory Property

Gets or sets the default category to use for arguments that don't have an explicit category.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 5.0.0+724ca9b7fa5edc075ec2ae65044e61b0d494fd1c
C#
public Object? DefaultArgumentCategory { get; set; }

Property Value

Object
An enumeration value that defines the category, or to use the default category, or no category if there is no default category. The default value is .

Remarks

The category must be an Enum value, and all arguments defined by a class (including any defined by its base classes) must use the same type. The CommandLineParser class will throw an exception if this is not the case.

This category will be used for arguments where the CommandLineArgumentAttributeCategory property is , and for the automatically generated help and version arguments.

Argument categories are used to group argument in the usage help; they are not used when parsing. The default UsageWriter will sort the categories based on their underlying enumeration values,

Exceptions

NotSupportedException When setting the property, the type of the value is not an enumeration type.

See Also