Exception has been thrown by the target of an invocation.

G

Guest

Often when I use the reflection API I get an exception whose associated message is "Exception has been thrown by the target of an invocation.". What does this error message mean?
 
E

Eric Gunnerson [MS]

Whenever you use something like Member.Invoke(), if the called method throws
an exception, the runtime will wrap that exception inside of the exception
that you got. You can find the original except using the inner property (or
by calling ToString() on the exception).

--
Eric Gunnerson

Visit the C# product team at http://www.csharp.net
Eric's blog is at http://weblogs.asp.net/ericgu/

This posting is provided "AS IS" with no warranties, and confers no rights.
Michael Stiefel said:
Often when I use the reflection API I get an exception whose associated
message is "Exception has been thrown by the target of an invocation.".
What does this error message mean?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top