public CommandLineParser(
ParseOptions? options = null
)
Public Sub New (
Optional options As ParseOptions = Nothing
)
Dim options As ParseOptions
Dim instance As New CommandLineParser(options)
public:
CommandLineParser(
ParseOptions^ options = nullptr
)
This constructor uses reflection to determine the arguments defined by the type T t runtime, unless the type has the GeneratedParserAttribute applied. For a type using that attribute, you can also use the generated static IParserProviderTSelfCreateParser(ParseOptions) or IParserTSelfParse(ParseOptions) methods on the arguments class instead.
If the options parameter is not , the instance passed in will be modified to reflect the options from the arguments class's ParseOptionsAttribute attribute, if it has one.
Certain properties of the ParseOptions class can be changed after the CommandLineParser class has been constructed, and still affect the parsing behavior. See the Options property for details.
NotSupportedException | The CommandLineParser cannot use type T as the command line arguments type, because it violates one of the rules concerning argument names or positions, or has an argument type that cannot be parsed. |