title: 'myObject' does not contain a property with the name 'ID' (Not a typo)
body: <p>I am building an ASP.NET C# website, and I have a dropdownlist that I am binding to a list of objects that I have created. The code that binds the dropdownlist looks like this:</p>
  
  <pre><code>protected void PopulateDropdownWithObjects(DropDownList dropdownlist, List&lt;myObject&gt;() myObjects)
  {
      dropdownlist.DataValueField = "ID";
      dropdownlist.DataTextField = "Name";
      dropdownlist.DataSource = myObjects;  // my code fails here
      dropdownlist.DataBind();
  }
  </code></pre>
  
  <p>However, when it hits the 3rd line within the method, an exception is thrown:</p>
  
  <pre><code>DataBinding: 'myObject' does not contain a property with the name 'ID'.
  </code></pre>
  
  <p>However, I can clearly see the myObject.ID value while I debug: I can access it in the Immediate window, it's public, it isn't null, and I spelled it correctly and with the proper case:</p>
  
  <pre><code>public class myObject
  {
      public int ID;   // see? "ID" is right here!
      public string Name;
  
      public myObject(
          int id,
          string name
          )
      {
          this.ID = id;
          this.Name = name;
      }
  }
  </code></pre>
  
  <p>Is there anything else that can cause this error?</p>