ValidateEnumValueAttributeAllowNonDefinedValues Property

Gets or sets a value that indicates whether values that do not match one of the enumeration's defined values are allowed.

Definition

Namespace: Ookii.CommandLine.Validation
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public bool AllowNonDefinedValues { get; set; }

Property Value

Boolean
if values that are not defined by the enumeration are allowed; otherwise, . The default value is .

Remarks

Non-defined values can be provided using the underlying numeric type of the enumeration. If this property is , this validator will not check whether a value provided in such a way actually is actually one of the enumeration's defined values.

Setting this to essentially makes this validator do nothing. It is useful if you want to use it solely to list defined values in the usage help, or if you want to use one of the other properties that affect the EnumConverter class without also checking for defined values.

See Also