title: Why can't C# member names be the same as the enclosing type name?
body: <p>In C#, the following code doesn't compile:</p>
  
  <pre><code>class Foo {
  
      public string Foo;
  
  }
  </code></pre>
  
  <p>The question is: why?</p>
  
  <p>More exactly, I understand that this doesn't compile because (I quote):</p>
  
  <blockquote>
    <p>member names cannot be the same as their enclosing type</p>
  </blockquote>
  
  <p>Ok, fine. I understand that, I won't do it again, I promise.</p>
  
  <p>But I really don't understand <em>why</em> the compiler refuses to take any field having the same name as an enclosing type. What is the underlying issue that prevents me to do that?</p>