Click or drag to resize

CommandLineParserParse Method (String, Int32)

Parses the specified command line arguments, starting at the specified index.

Namespace:  Ookii.CommandLine
Assembly:  Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 2.3.0
Syntax
public Object Parse(
	string[] args,
	int index
)

Parameters

args
Type: SystemString
The command line arguments.
index
Type: SystemInt32
The index of the first argument to parse.

Return Value

Type: Object
An instance of the type specified by the ArgumentsType property, or if argument parsing was cancelled by the ArgumentParsed event handler.
Exceptions
ExceptionCondition
ArgumentNullExceptionargs is .
ArgumentOutOfRangeExceptionindex does not fall within the bounds of args.
CommandLineArgumentException Too many positional arguments were supplied, a required argument was not supplied, an unknown argument name was supplied, no value was supplied for a named argument, an argument was supplied more than once and AllowDuplicateArguments is , or one of the argument values could not be converted to the argument's type.
See Also