CommandLineParserParse Method

Parses the arguments returned by the EnvironmentGetCommandLineArgs method.

Definition

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

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

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

See Also