title: How do private fields work in derived classes?
body: <p>When I inherit from a class such as <code>Button</code>, how do the properties of <code>Button</code> work in the derived class?  The private fields of <code>Button</code> are not inherited in my derived class, but don't the properties need to still be there so that the public properties can access the internal private state?  For example, how does the <code>Location</code> property work in the following example?</p>
  
  <pre><code>public class MyClass : Button
  {
      MyClass()
      {
          this.Location = new System.Drawing.Point(134, 34);
      }
  }
  </code></pre>
  
  <p>In the .NET source code, I see that <code>Location</code> is implemented as:</p>
  
  <pre><code>public Point Location
  {
      get
      {
          return new Point(this.x, this.y);    // x is a private field
      }
      set
      {
          this.SetBounds(value.X, value.Y, 
                         this.width, this.height, 
                         BoundsSpecified.Location);
      }
  }
  </code></pre>
  
  <p>I don't understand why the access to <code>this.x</code> and <code>this.y</code> doesn't cause an error in my derived class.</p>