title: Collection of Property=>Value?
body: <p>I would like to create a collection of key, value pairs in C# where the key is a property of an ASP.net control (e.g. ID) and the value is the value of that property.  I would like to do this so I may later iterate through the collection and see if a given control has the properties in my collection (and the values of the properties in the control match the values defined in my collection).  Any suggestions as to the best way to do this?  Thanks for any help.</p>
  
  <p>Pseudo-code example:</p>
  
  <pre><code>Properties[] = new Properties[] {new Property(){name="ID",value="TestControl1"}, new Property(){name = "Text",value="Type text here"}}
  
  private bool controlContainsProperties(Control control){
      foreach(Property Property in Properties[])
      {
          if((control does not contain property) || (control property value != Property.Value))
          return false;
      }
  return true;
  }
  </code></pre>