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里面有多个重载的函数,因此提示。

解决方法: 反射调用不能调用重载的函数,只能调用唯一的函数。

原文地址:https://www.cnblogs.com/soundcode/p/14283955.html