title: Why I can not access private field of a base class when private variables can be accessed this way
body: <p>I was reading question mentioned at links below<br>
  <a href="https://stackoverflow.com/questions/6983553/why-are-private-fields-private-to-the-type-not-the-instance">Why are private fields private to the type, not the instance?</a><br>
  <a href="https://stackoverflow.com/questions/18785289/access-to-private-members-of-class">Access to private members of class</a><br>
  <a href="https://stackoverflow.com/questions/16510997/access-private-field-of-a-instance-object">Access private field of a instance object</a>   </p>
  
  <pre><code>public class MyClass : ClassA
      {
          private object myObj;
  
          public object Field
          {
              get { return myObj; }
              set { myObj = value; }
          }
  
          public MyClass()
          { 
          }
  
  
          public MyClass(MyClass class1)
          {
              class1.myObj = 5;
              this.myObj = class1.myObj;
              class1.myObjOfClassA; // Why I can not access myObjOfClassA when I can access myObj of class1 object
          }
      }
  
  
      public class ClassA
      {
          private object myObjOfClassA;
  
      }
  </code></pre>
  
  <p>My question is<br>
  1) If we can access the private variables of Class as mentioned then why a class which extends another class can not access private variables of base class?</p>
  
  <p>2) I believe when code or classes will be compiled then all the methods, variables etc of base class will be added to derived class. Am I right on this?</p>