title: Detecting recursive properties
body: <p>Does anyone know if there is some option in VS2010 or some third party tool that I can use to detect recursive properties such as:</p>
  
  <pre><code>private string name;
  
  public string Name
  {
      get{ return this.Name; }
  }
  </code></pre>
  
  <p>The above is obviously an error, but the compiler offers no warnings. I can appreciate that, in general, recursive methods are perfectly legal, but the above scenario does not make much sense. In fact it happens when I write the property before the backing field, even when writing <code>this.name</code> in lower case, because VS2010 will see that <code>this.name</code> does not exist and change the casing to <code>this.Name</code> which does exist.</p>
  
  <p>The problem gets worse when binding to that property in WPF. The application crashes and takes VS2010 with it. That makes it very hard to debug, which is why I would love to have a tool of some kind that would alert me at compile time.</p>
  
  <p>Hope someone can help.</p>
  
  <p>/Klaus</p>