I have this simple method:
public void CacheDelegate(Object obj, MemberInfo memberInfo)
{
switch (memberInfo.MemberType)
{
case MemberTypes.Field:
Overload resolution works as follows.
Starting with the type called on, find the set of methods declared on that type that can be used.
If that set is empty, then try the same with the base type or interfaces declared. Keep moving up the hierarchy until at least one method that matches is found, or else error.
Of the set that is found, use the most specific method. Error if it's a tie.
So, of the four methods, three were declared in this class. Of those three two are not applicable. That leaves only public void CacheDelegate(Object obj, MemberInfo memberInfo)
as clearly the correct class to call, so it is called.
You could use ((BaseType)this).CacheDelegate(obj, methodInfo);
to force the call you want, since the base type has only one CacheDelegate
overload to choose between.