title: NDesk.Options - detect invalid arguments
body: <p>I am using <a href="http://www.ndesk.org/Options">NDesk.Options</a> to parse command line arguments for a C# command line program.  It is working fine, except I want my program to exit unsuccessfully, and show the help output, if the user includes arguments that I did not expect.</p>
  
  <p>I am parsing options thusly:</p>
  
  <pre><code>var options = new OptionSet {
      { "r|reset",  "do a reset", r =&gt; _reset = r != null },
      { "f|filter=",  "add a filter", f =&gt; _filter = f },
      { "h|?|help",  "show this message and exit",  v =&gt; _showHelp = v != null },
  };
  
  try
  {
      options.Parse(args);
  }
  catch (OptionException)
  {
      _showHelp = true;
      return false;
  }
  return true;
  </code></pre>
  
  <p>With this code, if I use an argument improperly, such as specifying <code>--filter</code> without  <code>=myfilter</code> after it then NDesk.Options will throw an OptionException and everything will be fine.  However, I also expected an OptionException to be thrown if I pass in an argument that doesn't match my list, such as <code>--someOtherArg</code>.  But this does not happen.  The parser just ignores that and keeps on trucking.</p>
  
  <p>Is there a way to detect unexpected args with NDesk.Options?</p>