title: Iterate over enum?
body: <p>I'm trying to iterate over an enum, and call a method using each of its values as a parameter. There has to be a better way to do it than what I have now:</p>
  
  <pre><code>foreach (string gameObjectType in Enum.GetNames(typeof(GameObjectType)))
  {
       GameObjectType kind = (GameObjectType) Enum.Parse(typeof (GameObjectType), gameObjectType);
       IDictionary&lt;string, string&gt; gameObjectData = PersistentUtils.LoadGameObject(kind, persistentState);
  }
  
  //...
  
  public static IDictionary&lt;string, string&gt; LoadGameObject(GameObjectType gameObjectType, IPersistentState persistentState) { /* ... */ }
  </code></pre>
  
  <p>Getting the enum names as strings, then parsing them back to enums, feels hideous.</p>