System.Reflection.TargetInvocationException

E704384

System.Reflection.TargetInvocationException is a .NET exception type that wraps and reports errors thrown by methods invoked dynamically via reflection.

All labels observed (3)

How this entity was disambiguated

Statements (46)

Predicate Object
instanceOf .NET exception type
System.Exception subclass
accessibility public
assembly System.Runtime
linked to: System.Runtime.dll

mscorlib
linked to: mscorlib.dll
canBeInherited true
category reflection-related exception
CLSCompliant true
commonUsage to inspect InnerException for actual error
definedInLanguage C#
F#
VB.NET
linked to: Visual Basic .NET
documentation https://learn.microsoft.com/dotnet/api/system.reflection.targetinvocationexception
errorCategory runtime error
exceptionHierarchyLevel second-level under System.Exception
fullName System.Reflection.TargetInvocationException
hasConstructor TargetInvocationException()
TargetInvocationException(SerializationInfo info, StreamingContext context)
TargetInvocationException(string message)
TargetInvocationException(string message, Exception innerException)
hasProperty HelpLink
InnerException
Message
Source
StackTrace
implements ISerializable
inheritsFrom System.Exception
introducedIn .NET Framework 1.0
linked to: .NET Framework
isSealed false
isSerializable true
memberType class
namespace System.Reflection
platform .NET 5+
.NET Core
.NET Framework
purpose wraps exceptions thrown by methods invoked via reflection
requires System.Reflection namespace import to reference by name
thrownWhen invoked member throws an exception during reflection call
typicalHandling catch TargetInvocationException and rethrow InnerException
usedBy Activator.CreateInstance
ConstructorInfo.Invoke
MethodBase.Invoke
System.Delegate.DynamicInvoke
System.Reflection.MethodInfo.Invoke
wraps exception thrown by dynamically invoked constructor
exception thrown by dynamically invoked method

How these facts were elicited

Referenced by (5)

Full triples — surface form annotated when it differs from this entity's canonical label.

System.Reflection containsType System.Reflection.TargetInvocationException
System.Reflection.TargetException relatedTo System.Reflection.TargetInvocationException
System.Reflection.TargetInvocationException hasConstructor TargetInvocationException()
linked to: System.Reflection.TargetInvocationException
System.Reflection.TargetInvocationException hasConstructor TargetInvocationException(string message)
linked to: System.Reflection.TargetInvocationException
System.Reflection.TargetInvocationException fullName System.Reflection.TargetInvocationException