Rhino.FunctionObject.FindSingleMethod C# (CSharp) Method

FindSingleMethod() static private method

static private FindSingleMethod ( MethodInfo methods, string name ) : MethodInfo
methods System.Reflection.MethodInfo
name string
return System.Reflection.MethodInfo
		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;
		}