Note
This is not the long description used to describe the purpose of the argument. That can be set
using the DescriptionAttribute attribute.
public class ValueDescriptionAttribute : Attribute
Public Class ValueDescriptionAttribute
Inherits Attribute
Dim instance As ValueDescriptionAttribute
public ref class ValueDescriptionAttribute : public Attribute
The value description is a short, typically one-word description that indicates the type of value that the user should supply.
The value description is used when generating usage help. For example, the usage for an argument named Sample with a value description of String would look like "-Sample <String>".
You can apply this attribute to a property or method defining an argument to set the value description for that argument. You can also apply it to a type to set a default value description for that type.
If this attribute is not present, the name of the type of the argument is used by default, applying the name transformation specified by the ParseOptionsValueDescriptionTransform property or the ParseOptionsAttributeValueDescriptionTransform property.
If a custom value description is set using this attribute, the name transformation is not applied unless the ApplyTransform property is .
If you want to override the value description for all arguments of a specific type, and you cannot apply the ValueDescriptionAttribute to this type, you can use the ParseOptionsDefaultValueDescriptions property.
You can derive from this attribute to use an alternative source for the value description, such as a resource table that can be localized.
ValueDescriptionAttribute | Initializes a new instance of the ValueDescriptionAttribute attribute. |
ApplyTransform | Gets or sets a value that indicates whether the custom value description should be transformed according to the ParseOptionsValueDescriptionTransform property. |
TypeId | When implemented in a derived class, gets a unique identifier for this Attribute. (Inherited from Attribute) |
ValueDescription | Gets the value description for the argument. |
ValueDescriptionValue | Gets the value description stored in this attribute. |
Equals | Returns a value that indicates whether this instance is equal to a specified object. (Inherited from Attribute) |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object) |
GetHashCode | Returns the hash code for this instance. (Inherited from Attribute) |
GetType | Gets the Type of the current instance. (Inherited from Object) |
IsDefaultAttribute | When overridden in a derived class, indicates whether the value of this instance is the default value for the derived class. (Inherited from Attribute) |
Match | When overridden in a derived class, returns a value that indicates whether this instance equals a specified object. (Inherited from Attribute) |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object) |
ToString | Returns a string that represents the current object. (Inherited from Object) |