I am using the C# CommandLineParser to handle my command-line arguments.
https://github.com/commandlineparser/commandline
The only options I allow on the command-line are:
myprogram.exe -a 4 -b -c value
If I accidentally forget a dash on an optional Option (argument) like:
myprogram.exe -a b -c
The program still runs and doesn't complain about "b". How can I report an error if an expected argument like this is specified? I've tried using:
var parser = new CommandLine.Parser(s =>
{
s.IgnoreUnknownArguments = false;
});
But this doesn't seem to flag any error. Ideas?