Why can a class not have a static or constant property and an instance property of the same name?
<p>I've never really questioned this before until now. I've got an input model with a number of fields, I wanted to present the string names of the properties through the input model so that my Grid can use them:</p>

<pre><code>public class SomeGridRow
{
    public string Code { get;set; }
    public string Description { get;set; }

    public const string Code = "Code";
}
</code></pre>

<p>Obviously, this gives the error:</p>

<blockquote>
  <p>The type 'SomeGridRow' already
  contains a definition for 'Code'</p>
</blockquote>

<p>Why can the CLR not cope with two properties of the same name which are, in my eyes, separate?</p>

<pre><code>string code = gridRow.Code;          // Actual member from instantiated class
string codeField = SomeGridRow.Code; // Static/Const
</code></pre>

<p>I'm now just using a child class called <code>Fields</code> within my inputs now, so I can use <code>SomeGridRow.Fields.Code</code>. It's a bit messy, but it works.</p>
