Skip to content

Exception #3

@maxima120

Description

@maxima120

If you try to dump KeyEventArgs in WPF .NET Framework app with max level 10+ you get exception:

code:

 propertyInfo.GetValue(element, null);

exception:

'propertyInfo.GetValue(element, null)' threw an exception of type 'System.Reflection.TargetInvocationException'
    Data: {System.Collections.ListDictionaryInternal}
    HResult: -2146232828
    HelpLink: null
    InnerException: {"Method may only be called on a Type for which Type.IsGenericParameter is true."}
    Message: "Exception has been thrown by the target of an invocation."
    Source: "mscorlib"
    StackTrace: "   at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)\r\n   at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)\r\n   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)\r\n   at System.Reflection.RuntimePropertyInfo.GetValue(Object obj, Object[] index)"
    TargetSite: {System.Object InvokeMethod(System.Object, System.Object[], System.Signature, Boolean)}

element variable:

{Name = "Window" FullName = "System.Windows.Window"}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions