title: Why doesn't the C# compiler stop properties from referring to themselves?
body: <p>If I do this I get a <code>System.StackOverflowException</code>:</p>
  
  <pre><code>private string abc = "";
  public string Abc
  {
      get
      { 
          return Abc; // Note the mistaken capitalization
      }
  }
  </code></pre>
  
  <p>I understand why -- the property is referencing itself, leading to an infinite loop.  (See previous questions <a href="https://stackoverflow.com/questions/367192/new-to-c-why-does-property-set-throw-stackoverflow-exception">here</a> and <a href="https://stackoverflow.com/questions/680765/stackoverflow-on-class-property-closed">here</a>).</p>
  
  <p>What I'm wondering (and what I didn't see answered in those previous questions) is why doesn't the C# compiler catch this mistake?  It checks for some other kinds of circular reference (classes inheriting from themselves, etc.), right?  Is it just that this mistake wasn't common enough to be worth checking for?  Or is there some situation I'm not thinking of, when you'd want a property to actually reference itself in this way?</p>