title: Why can't I access C# protected members except like this?
body: <p>This code:</p>
  
  <pre><code>abstract class C
  {
      protected abstract void F(D d);
  }
  
  class D : C
  {
      protected override void F(D d) { }
  
      void G(C c)
      {
          c.F(this);
      }
  }
  </code></pre>
  
  <p>Generates this error:</p>
  
  <blockquote>
    <p>Cannot access protected member 'C.F(D)' via a qualifier of type 'C'; the qualifier must be of type 'D' (or derived from it)    </p>
  </blockquote>
  
  <p>What in the world were they thinking? (Would altering that rule break something?) And is there a way around that aside from making F public?</p>
  
  <hr>
  
  <p>Edit: I now get the reason for why this is (Thanks <a href="https://stackoverflow.com/questions/567705/why-cant-i-access-c-protected-members-except-like-this/567732#567732">Greg</a>) but I'm still a bit perplexed as to the rational; given:</p>
  
  <pre><code>class E : C
  {
      protected override void F(D d) { }
  }  
  </code></pre>
  
  <p>Why <em>shouldn't</em> D be able to be able to call E.F? </p>
  
  <hr>
  
  <p>The error message is edited so I might have put a typo in there.</p>