UnknownArgumentEventArgsToken Property

Gets the token for the unknown argument.

Definition

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

Property Value

String
The raw token value.

Remarks

For an unknown named argument, the token includes the prefix, and the value if one was present using a non-whitespace separator. For example, "-Name:Value" or "--name".

If the unknown argument was part of a combined short switch argument when using ParsingModeLongShort, the Token property will contain all the switch names, while the Name property only contains the name of the unknown switch. For example, the token could be "-xyz" while the name is "y".

For an unknown positional argument value, the Token property is equal to the Value property.

See Also