CommandLineArgumentAttributeIsPositional Property

Gets or sets a value that indicates that an argument is positional.

Definition

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

Property Value

Boolean
if the argument is positional; otherwise, .

Remarks

If the Position property is set to a non-negative value, this property always returns .

When using the GeneratedParserAttribute attribute, you can set the IsPositional property to without setting the Position property, to order positional arguments using the order of the members that define them.

Doing this is not supported without the GeneratedParserAttribute attribute, because reflection is not guaranteed to return class members in any particular order. The CommandLineParser class will throw an exception if the IsPositional property is without a non-negative Position property value if reflection is used.

See Also