title: Why is the compiler choosing the wrong method overload?
body: <p>I have this simple method:</p>
  
  <pre><code>public void CacheDelegate(Object obj, MemberInfo memberInfo)
  {
     switch (memberInfo.MemberType)
     {
      case MemberTypes.Field:
         var fieldInfo = (FieldInfo) memberInfo;
         CacheDelegate(obj, fieldInfo);
         break;
      case MemberTypes.Property:
         var propertyInfo = (PropertyInfo) memberInfo;
         CacheDelegate(obj, propertyInfo);
         break;
      case MemberTypes.Method:
         var methodInfo = (MethodInfo) memberInfo;
         CacheDelegate(obj, methodInfo);
         break;
      default:
         throw new Exception("Cannot create a delegate for MemberInfo provided.");
      }
  }
  </code></pre>
  
  <p>The method above resolves the type of the memberInfo and calls the applicable method from the following:</p>
  
  <pre><code>public void CacheDelegate(Object obj, FieldInfo fieldInfo)
  {
     // Do stuff...
  }
  
  public void CacheDelegate(Object obj, PropertyInfo propertyInfo)
  {
     // Do stuff...
  }
  
  public sealed override void CacheDelegate(Object obj, MethodInfo methodInfo)
  {
     // Do stuff...
  }
  </code></pre>
  
  <p>The problem is that the last case label, case MemberTypes.Method, doesn't call the CacheDelegate method with the Method Info overload, but calls the CacheDelegate with the Member Info overload instead! So it's basically just calling itself over and over again, recursively. I tried specifying the parameter name, methodInfo: methodInfo when calling the method, but then the Unity engine is telling me the best overloaded method does not contain a parameter named methodInfo.</p>
  
  <p>I'm quite at a loss of why this is happening.
  Any help would be greatly appreciated.</p>