title: Unhandled exception in try/catch block
body: <p>This one is really baking my noodle...</p>
  
  <p>I've got some code. When I run it, Visual Studio complains about an unhandled exception. And, sure enough, there <em>is</em> an exception. However, it's blatently inside a try/catch block, so... <em>how is that "unhandled"??</em></p>
  
  <p>I've searched around, and the only relevant hit I can find is related to LINQ. But I'm not using any LINQ, so that can't be it.</p>
  
  <p>The relevant code looks something like this:</p>
  
  <pre><code>try
  {
    method.Invoke(target, new object[0]);
  }
  catch (MyException e)
  {
    Console.WriteLine(e);
  }
  </code></pre>
  
  <p>The method being hit by <code>Invoke()</code> is different every time. Some of these methods really do throw exceptions - which is fine. But that's why I put it in a try-block! I don't understand why VS is complaining that the exception isn't handled.</p>
  
  <p>(Yes, I have checked that the exception being thrown is a <code>MyException</code> object.)</p>
  
  <p>At this point, my only guess is that it's somehow related to using reflection. I really need to fix this though... Any suggestions?</p>