<p>I am calling, through reflection, a method which may cause an exception. How can I pass the exception to my caller without the wrapper reflection puts around it?<br>
I am rethrowing the InnerException, but this destroys the stack trace.<br>
Example code:</p>

<pre><code>public void test1()
{
    // Throw an exception for testing purposes
    throw new ArgumentException("test1");
}

void test2()
{
    try
    {
        MethodInfo mi = typeof(Program).GetMethod("test1");
        mi.Invoke(this, null);
    }
    catch (TargetInvocationException tiex)
    {
        // Throw the new exception
        throw tiex.InnerException;
    }
}
</code></pre>

I think your best bet would be to just put this in your catch block:
```
```
throw;
```
```
And then extract the innerexception later.