How can I use Generics to create a way of making an IEnumerable from an enum?
<p>Given an enum like this:</p>

<pre><code>public enum City {
    London    = 1,
    Liverpool  = 20,
    Leeds       = 25
}

public enum House {
    OneFloor    = 1,
    TwoFloors = 2
}
</code></pre>

<p>I am using the following code to give me an IEnumerable:</p>

<pre><code>City[] values = (City[])Enum.GetValues(typeof(City)); 
var valuesWithNames = from value in values                       
   select new { value = (int)value, name = value.ToString() }; 
</code></pre>

<p>The code works very good however I have to do this for quite a lot of enums. Is there a way I could create a generic way of doing this?</p>
