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