internal static MethodInfo FindSingleMethod(MethodInfo[] methods, string name)
{
MethodInfo found = null;
for (int i = 0, N = methods.Length; i != N; ++i)
{
MethodInfo method = methods[i];
if (method != null && name.Equals(method.Name))
{
if (found != null)
{
throw Context.ReportRuntimeError2("msg.no.overload", name, method.DeclaringType.FullName);
}
found = method;
}
}
return found;
}