CommandLineParserGetArgument Method

Gets a command line argument by name or alias.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.2.0+a4d3631e4dcc0970081ed435288efdebc1325f83
C#
public CommandLineArgument? GetArgument(
	string name
)

Parameters

name  String
The name or alias of the argument.

Return Value

CommandLineArgument
The CommandLineArgument instance containing information about the argument, or if the argument was not found.

Remarks

If the Mode property is ParsingModeLongShort, this uses the long name and long aliases of the argument.

This method only uses the actual names and aliases; it does not consider auto prefix aliases regardless of the value of the ParseOptionsAutoPrefixAliases property.

Exceptions

See Also