CommandLineParserParse(String) Method

Parses the specified command line arguments.

Definition

Namespace: Ookii.CommandLine
Assembly: Ookii.CommandLine (in Ookii.CommandLine.dll) Version: 4.0.0+bb7ed9a8fdfd1cb21824750a8cf508863ad15086
C#
public Object? Parse(
	string[] args
)

Parameters

args  String
The command line arguments.

Return Value

Object
An instance of the type specified by the ArgumentsType property, or if argument parsing was canceled by the ArgumentParsed event handler, the CommandLineArgumentAttributeCancelParsing property, or a method argument that returned CancelModeAbort or .

Remarks

If the return value is , check the HelpRequested property to see if usage help should be displayed.

Exceptions

ArgumentNullExceptionargs is .
CommandLineArgumentException An error occurred parsing the command line. Check the CommandLineArgumentExceptionCategory property for the exact reason for the error.

See Also