title: Extension method on enumeration, not instance of enumeration
body: <p>I have an enumeration for my Things like so:</p>
  
  <pre><code>public enum Things
  {
     OneThing,
     AnotherThing
  }
  </code></pre>
  
  <p>I would like to write an extension method for this enumeration (similar to <a href="https://stackoverflow.com/questions/388483/how-do-you-create-a-dropdownlist-from-an-enum-in-asp-net-mvc/694361#694361">Prise's answer here</a>) but while that method works on an <em>instance of the enumeration</em>, ala</p>
  
  <pre><code>Things thing; var list = thing.ToSelectList();
  </code></pre>
  
  <p>I would like it to work on the <em>actual enumeration</em> instead:</p>
  
  <pre><code>var list = Things.ToSelectList();
  </code></pre>
  
  <p>I could just do </p>
  
  <pre><code>var list = default(Things).ToSelectList();
  </code></pre>
  
  <p>But I don't like the look of that :)  </p>
  
  <p>I have gotten closer with the following extension method:</p>
  
  <pre><code>public static SelectList ToSelectList(this Type type)
  {
     if (type.IsEnum)
     {
        var values = from Enum e in Enum.GetValues(type)
                     select new { ID = e, Name = e.ToString() };
        return new SelectList(values, "Id", "Name");
     }
     else
     {
        return null;
     }
  }
  </code></pre>
  
  <p>Used like so:</p>
  
  <pre><code>var list = typeof(Things).ToSelectList();
  </code></pre>
  
  <p>Can we do any better than that?</p>