title: How to correctly unwrap a TargetInvocationException?
body: <p>I am writing a component which, at the top level, invokes a method via reflection. To make my component easier to use, I'd like to catch any exceptions thrown by the invoked method and unwrap them.</p>
  
  <p>Thus, I have something like:</p>
  
  <pre><code>try { method.Invoke(obj, args); }
  catch (TargetInvocationException ex) {
      throw ex.InnerException;
  }
  </code></pre>
  
  <p>However, this blows away the inner exception stack trace. I can't use just <code>throw</code> here (because I'm rethrowing a different exception object). What can I do in my catch block to make sure that the original exception type, message, and stack trace all get through?</p>