title: Why can't I have protected interface members?
body: <p>What is the argument against declaring protected-access members on interfaces? This, for example, is invalid:</p>
  
  <pre><code>public interface IOrange
  {
      public OrangePeel Peel { get; }
      protected OrangePips Seeds { get; }
  }
  </code></pre>
  
  <p>In this example, the interface <code>IOrange</code> would guarantee that implementors <em>at least</em> provide an <code>OrangePips</code> instance to their inheritors. If the implementor wanted to, they could expand the scope to full <code>public</code>:</p>
  
  <pre><code>public class NavelOrange : IOrange
  {
      public OrangePeel Peel { get { return new OrangePeel(); } }
      protected OrangePips Seeds { get { return null; } }
  }
  
  public class ValenciaOrange : IOrange
  {
      public OrangePeel Peel { get { return new OrangePeel(); } }
      public OrangePips Seeds { get { return new OrangePips(6); } }
  }
  </code></pre>
  
  <p>The intent of <code>protected</code> members on interfaces is to provide a support contract for <em>inheritors</em> (sub-classes), for example:</p>
  
  <pre><code>public class SpecialNavelOrange : NavelOrange
  {
      ...
      // Having a seed value is useful to me.
      OrangePips seeds = this.Seeds; 
      ...
  }
  </code></pre>
  
  <p>(Admittedly, this wouldn't work for <code>struct</code>s)</p>
  
  <p>I can't see much of a case for <code>private</code> or <code>internal</code> modifiers in interfaces, but supporting both <code>public</code> and <code>protected</code> modifiers seems perfectly reasonable.</p>
  
  <hr/>
  
  <p>I'm going to try explaining the utility of <code>protected</code> members on <code>interface</code>s by separating them from <code>interface</code>s entirely:</p>
  
  <p>Let's imagine a new C# keyword, <code>support</code>, to enforce inheritor contracts, so that we declare things as follows:</p>
  
  <pre><code>public support IOrangeSupport
  {
      OrangePips Seeds { get; }
  }
  </code></pre>
  
  <p>This would allows us to contract classes to provide protected members to their inheritors:</p>
  
  <pre><code>public class NavelOrange : IOrange, IOrangeSupport
  {
      public OrangePeel Peel { get { return new OrangePeel(); } }
      protected OrangePips Seeds { get { return null; } }
  }
  </code></pre>
  
  <p>This is not particularly useful, because classes would already imply this contract by providing the <code>protected</code> members in the first place.</p>
  
  <p>But then we could also do this:</p>
  
  <pre><code>public interface IOrange : IOrangeSupport
  {
     ...
  }
  </code></pre>
  
  <p>Thereby applying <code>IOrangeSupport</code> to all classes which implement <code>IOrange</code> and requiring them to provide particular <code>protected</code> members - which is not something we can currently do.</p>