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里面有多個重載的函數,因此提示。

解決方法: 反射調用不能調用重載的函數,只能調用唯一的函數。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM