'System.Reflection.TargetInvocationException' occurred in PresentationFramework.dll

后端 未结 5 669
时光取名叫无心
时光取名叫无心 2021-02-03 21:03

Okay, I have a bit of a weird bug...

This works fine:

private void radioButtonNormalPoint_Checked(object sender, RoutedEventArgs e)
{
   //comboBoxNormal         


        
5条回答
  •  春和景丽
    2021-02-03 21:26

    To diagnose this issue, place the line of code causing the TargetInvocationException inside the try block.

    To troubleshoot this type of error, get the inner exception. It could be due to a number of different issues.

    try
    {
        // code causing TargetInvocationException
    }
    catch (Exception e)
    {
        if (e.InnerException != null)
        {
        string err = e.InnerException.Message;
        }
    }
    

提交回复
热议问题