title: I cant access the property of the base class?
body: <p>I have a simple class here</p>
  
  <pre><code>class Leader : Inhabitants
  {
  
      public int ProducedWorth { get; set; }
      public Leader(string name, int age, string profession, int producedWorth)
      {
          InhabitantID = InhabitantCount;
          Name = name;
          Age = age;
          Profession = profession;
          ProducedWorth = producedWorth;
      }
      public int GetProducedWorth()
      {
          return ProducedWorth;
      }
  }
  </code></pre>
  
  <p>which inherits from a Inhabitant class</p>
  
  <pre><code> class Inhabitants
  {
      static protected int InhabitantCount;
      public Inhabitants()
      {
          InhabitantCount++;
      }
      public int InhabitantID { get; set; }
      public string Name { get; set; }
      public int Age { get; set; }
      public string Profession { get; set; }
  }
  </code></pre>
  
  <p>Now when I create new instances of the class it seems to work perfectly fine, but when I try to access to the producedWorth property that is only on the base class i get the error that the inherited class does not have said property?</p>
  
  <pre><code>var leadA = new Leader("Julien", 33, "Stone pit overseer", 6540)
  //leadA.Name is accessible
  //leadA.producedWorth is not accessible
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/dxXWd.png" alt="program.cs"></p>