Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ FindMostDerivedNewSlotMeth()

static MethodBase System.DefaultBinder.FindMostDerivedNewSlotMeth ( MethodBase[] match,
int cMatches )
inlinestaticpackageinherited

Definition at line 951 of file DefaultBinder.cs.

952 {
953 int num = 0;
954 MethodBase result = null;
955 for (int i = 0; i < cMatches; i++)
956 {
957 int hierarchyDepth = GetHierarchyDepth(match[i].DeclaringType);
958 if (hierarchyDepth == num)
959 {
960 throw new AmbiguousMatchException(SR.Arg_AmbiguousMatchException);
961 }
962 if (hierarchyDepth > num)
963 {
964 num = hierarchyDepth;
965 result = match[i];
966 }
967 }
968 return result;
969 }
static int GetHierarchyDepth(Type t)

References System.SR.Arg_AmbiguousMatchException, System.DefaultBinder.GetHierarchyDepth(), and System.match.

Referenced by System.DefaultBinder.ExactBinding(), and System.RuntimeType.GetMethodImplCommon().