CommandLineParserGetArgument Method

Gets a command line argument by name or alias.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
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