title: Loop through constant members of a class
body: <p>I have a class with constant strings in it.  I'd like to throw all of those strings into a drop down collection.  What is the best way to do this?  This is what I have now and in theory, I would think that it would be the best way to do this.</p>
  
  <pre><code>public class TestClass
  {
      private const string _testA = "Test A";
      private const string _testB = "Test B";
  
      public string TestA
      {
          get { return _testA; }
      }
  
      public string TestB
      {
          get { return _testB; }
      }
  }
  
  public DropDownItemCollection TestCollection
  {
      DropDownItemCollection collection = new DropDownItemCollection();
      TestClass class = new TestClass();
  
      foreach (string testString in class)
      {
          DropDownItem item = new DropDownItem();
          item.Description = testString;
          item.Value = testString;
          collection.Add(item);
      }
  
      return collection;
  }
  </code></pre>
  
  <p>The problem is that this returns an error on the foreach:  "...does not contain a public definition for GetEnumerator."  I've tried to create a GetEnumerator but I've been unsuccessful and I haven't worked with GetEnumerator in the past.</p>
  
  <p>Any help is greatly appreciated!</p>