Hobbscene.com

Uncensored web development. Parental guidance suggested.

☰ Menu

Skip to content
  • Home
  • Code
    • Flash Pageflip
    • MVC Guestbook
    • Star Rating plug-in
  • Photos
    • Mt. Rainier
    • NW Trek
    • Panoramas
  • About
  • Contact

Tag Archives: enum

Enum to list

Posted on January 29, 2013 by Tim Hobbs

Just a quickie since I always seem to forget this one:

Enum.GetValues(typeof(MyEnum)).Cast<MyEnum>()

This will create an IEnumerable<MyEnum> that can then be converted to a list or whatever.

Posted in Code | Tagged C#, enum, list | Leave a comment
Bookmark the permalink.

Find something useful?

If you are so inclined, you can show your appreciation with a small tip - though a simple comment will do just fine.

Archives

Tags

AJAX angularjs ASP.NET automation Batchfiles Bootstrap C# Cassette client validation code CSS CSS3 DOS extension method FluentValidation Gist GitHub HTML5 javascript jQuery js JSON knockoutjs Massive MSBuild MSSQL MVC NuGet PHP plugin Powershell reporting Select2 SQL SVG SVN Testing Tools validation VS Web WebAPI widgets Wordpress work

Blogroll

  • Brad Wilson
  • Dave Ebbo
  • Dave Ward
  • Jeff Atwood
  • Rob Conery
  • Ryan Niemeyer
  • Scott Guthrie
  • Scott Hanselman
  • Steve Sanderson

Last.fm Recent Tracks

  • All The Things She Said (Remastered 2005
    Edit)

    Played: 13 Jun 2026, 08:33

  • Alphaville
    Forever Young

    Played: 13 Jun 2026, 08:29

  • Culture Club
    Karma Chameleon

    Played: 13 Jun 2026, 08:25

  • Naked Eyes
    Promises, Promises

    Played: 13 Jun 2026, 08:21

  • Men at Work
    Everything I Need

    Played: 13 Jun 2026, 08:18

  • The Cure
    Inbetween Days

    Played: 13 Jun 2026, 08:15

  • Duran Duran
    Rio

    Played: 13 Jun 2026, 08:10

  • David Bowie
    China Girl

    Played: 13 Jun 2026, 08:04

  • Duran Duran
    New Moon On Monday

    Played: 13 Jun 2026, 07:58

  • Men at Work
    Overkill

    Played: 13 Jun 2026, 07:55

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org
Powered by WordPress

RSS Feed Google+ Facebook Twitter