title: force get/set access of private variables for private properties
body: <p>If I have a private variable that I want to have some internal validation on, and I want to keep that validation in one place, I put it behind a getter/setter and only access it thorugh that getter/setter. That's useful when dealing with public properties, because the other code cannot access the private variable, but when I'm dealing with object inside the class itself, is there any way to enforce the getter/setter? </p>
  
  <pre><code>  private int _eyeOrientation;
  
    private int eyeOrientation
    {
       get
       {
          return _eyeOrientation;
       }
       set
       {
          if (value &lt; 0)
          {
             _eyeOrientation = 0;
          }
          else
          {
             _eyeOrientation = value % 360;
          }
       }
    }
  </code></pre>
  
  <p>The issue here being that the other functions in the class may accidentally modify </p>
  
  <p><code>_eyeOrientation = -1;</code> </p>
  
  <p>which would throw the program into a tizzy. Is there any way to get that to throw a compiler error?</p>