title: Is there a way to limit who can inherit a class or interface?
body: <p>I wonder if there is a way to limit who can inherit from a class.</p>
  
  <ul>
  <li><code>internal</code>: doesn't allow class to be inherited outside the assembly</li>
  <li><code>sealed</code>: class cannot be inherited</li>
  </ul>
  
  <p>Is there a keyword or way to allow only certain classes (let's say from it's own namespace only) to inherit that class?</p>
  
  <p>Also, I do not want this special class to be generic.
  My concern isn't security but the design in general.</p>
  
  <p>Example of what I want:</p>
  
  <ul>
  <li>Class A.</li>
  <li>Class B inherits from A</li>
  <li>Class C cannot inherit from A</li>
  </ul>