title: Inheritance : does not contain a definition for and no extension method accepting a first argument
body: <pre><code>abstract class Parent
  {
          protected string attrParent;
  
          public AttrParent { get; protected set }
  
          public Parent(string sParent)
          {
              AttrParent = sParent;
          }
  }
  
  class Child : Parent
  {
          private string attrChild;
  
          public AttrChild { get; private set }
  
          public Child(string sParent, string sChild) : base(sParent)
          {
              AttrChild = sChild;
          }
  }
  
  class Program
  {
          static void Main(string[] args)
          {
              Parent p = new Child();
  
              p.AttrChild = "hello";
          }
  }
  </code></pre>
  
  <p>When I run this program, I get the following error : </p>
  
  <blockquote>
    <p>'Example.Parent' does not contain a definition for 'AttrChild' and no extension method 'AttrChild' accepting a first argument of type 'Example.Parent'"</p>
  </blockquote>
  
  <p>Can anybody explain why this is?</p>