Documentation for the C# command-line option parsing library

Parser.Parse Method (OptStyle, UnixShortOption, DupOptHandleType, UnknownOptHandleType, Boolean, String[])

Parse the arguments for options using the given settings

public string[] Parse(
   OptStyle optStyle,
   UnixShortOption unixShortOption,
   DupOptHandleType dupOptHandleType,
   UnknownOptHandleType unknownOptHandleType,
   bool caseSesitive,
   string[] args
);

Parameters

optStyle
What type of options to parse
unixShortOption
How to parse unix short options (ignored if not unix style parsing)
dupOptHandleType
How to handle un-expected duplicate option definitions
unknownOptHandleType
How to handle options that were not defined
caseSesitive
If the parsing of options should consider the case of the options
args
The command-line arguments to parse

Return Value

Arguments from the command-line that were not options

See Also

Parser Class | CommandLine.OptParse Namespace | Parser.Parse Overload List