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

◆ ExactBinding()

static MethodBase System.DefaultBinder.ExactBinding ( MethodBase[] match,
Type[] types,
ParameterModifier[] modifiers )
inlinestaticinherited

Definition at line 655 of file DefaultBinder.cs.

656 {
657 if (match == null)
658 {
659 throw new ArgumentNullException("match");
660 }
661 MethodBase[] array = new MethodBase[match.Length];
662 int num = 0;
663 for (int i = 0; i < match.Length; i++)
664 {
665 ParameterInfo[] parametersNoCopy = match[i].GetParametersNoCopy();
666 if (parametersNoCopy.Length == 0)
667 {
668 continue;
669 }
670 int j;
671 for (j = 0; j < types.Length; j++)
672 {
673 Type parameterType = parametersNoCopy[j].ParameterType;
674 if (!parameterType.Equals(types[j]))
675 {
676 break;
677 }
678 }
679 if (j >= types.Length)
680 {
681 array[num] = match[i];
682 num++;
683 }
684 }
685 return num switch
686 {
687 0 => null,
688 1 => array[0],
690 };
691 }
static MethodBase FindMostDerivedNewSlotMeth(MethodBase[] match, int cMatches)

References System.array, System.Type.Equals(), System.DefaultBinder.FindMostDerivedNewSlotMeth(), System.match, and System.Reflection.ParameterInfo.ParameterType.

Referenced by System.RuntimeType.GetConstructorImpl().