CommandLineParser.AllowDuplicateArguments Property

Gets a value indicating whether duplicate arguments are allowed.

Definition

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

Property Value

Boolean
true if it is allowed to supply non-multi-value arguments more than once; otherwise, false. The default value is false.

Remarks

If the AllowDuplicateArguments property is false, a CommandLineArgumentException is thrown by the Parse(String[]) method if an argument's value is supplied more than once.

If the AllowDuplicateArguments property is true, the last value supplied for the argument is used if it is supplied multiple times.

The AllowDuplicateArguments property has no effect on multi-value or dictionary arguments, which can always be supplied multiple times.

Use the ParseOptions or ParseOptionsAttribute class to change this value.

See Also