C#反射调用 异常信息:Ambiguous match found.
異常信息(異常類型:System.Reflection.AmbiguousMatchException)
異常提示:Ambiguous match found.
異常信息:Ambiguous match found.
導致錯誤的應用程序或對象的名稱:mscorlib
引發當前異常的方法:System.Reflection.MethodInfo GetMethodImpl(System.String, System.Reflection.BindingFlags, System.Reflection.Binder, System.Reflection.CallingConventions, System.Type[], System.Reflection.ParameterModifier[])
異常相關幫助:
堆棧信息:
?? at System.RuntimeType.GetMethodImpl(String name, BindingFlags bindingAttr, Binder binder, CallingConventions callConv, Type[] types, ParameterModifier[] modifiers)
?? at System.Type.GetMethod(String name, BindingFlags bindingAttr)
出現原因:由于被調用的dll里面有多個重載的函數,因此提示。
解決方法: 反射調用不能調用重載的函數,只能調用唯一的函數。
與50位技術專家面對面20年技術見證,附贈技術全景圖總結
以上是生活随笔為你收集整理的C#反射调用 异常信息:Ambiguous match found.的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: C# 获取属性的displayName
- 下一篇: WinForm 限制同一个进程只能打开一