CommandLineArgumentAttributeValueDescription Property

Gets or sets a short description of the property's value to use when printing usage information.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 3.0.0
C#
public string? ValueDescription { get; set; }

Property Value

String
The description of the value, or to indicate that the property's type name should be used, applying the NameTransform specified by the ValueDescriptionTransform or ValueDescriptionTransform property.

Remarks

The value description is a short, typically one-word description that indicates the type of value that the user should supply.

If not specified here, it is retrieved from the DefaultValueDescriptions property, and if not found there, the type of the property is used, applying the NameTransform specified by the ValueDescriptionTransform property or the ValueDescriptionTransform property. If this is a multi-value argument, the element type is used. If the type is NullableT, its underlying type is used.

If you want to override the value description for all arguments of a specific type, use the DefaultValueDescriptions property.

The value description is used only when generating usage help. For example, the usage for an argument named Sample with a value description of String would look like "-Sample <String>".

  Note

This is not the long description used to describe the purpose of the argument. That can be set using the DescriptionAttribute attribute.

See Also