public event EventHandler<UnknownArgumentEventArgs> UnknownArgument
Public Event UnknownArgument As EventHandler(Of UnknownArgumentEventArgs)
Dim instance As CommandLineParser
Dim handler As EventHandler(Of UnknownArgumentEventArgs)
AddHandler instance.UnknownArgument, handler
public:
event EventHandler<UnknownArgumentEventArgs^>^ UnknownArgument {
void add (EventHandler<UnknownArgumentEventArgs^>^ value);
void remove (EventHandler<UnknownArgumentEventArgs^>^ value);
}
Specifying an argument with an unknown name, or too many positional arguments, is normally an error. By handling this event and setting the UnknownArgumentEventArgsIgnore property to , you can instead continue parsing the remainder of the command line, ignoring the unknown argument.
You can also cancel parsing instead using the UnknownArgumentEventArgsCancelParsing property.
If an unknown argument name is encountered and is followed by a value separated by whitespace, that value will be treated as the next positional argument value. It is not considered to be a value for the unknown argument.