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.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
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