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
profile for jesus.tesh at Stack Overflow, Q&A for professional and enthusiast programmers

Blogroll

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

Last.fm Recent Tracks

  • Kiss
    Calling Dr. Love

    Now playing

  • David Bowie
    Space Oddity

    Played: 11 May 2018, 00:37

  • Prince & The Revolution
    I Would Die 4 U

    Played: 11 May 2018, 00:34

  • Muse
    Panic Station

    Played: 11 May 2018, 00:31

  • Led Zeppelin
    Gallows Pole

    Played: 11 May 2018, 00:26

  • Steely Dan
    Rose Darling

    Played: 11 May 2018, 00:23

  • Ben Harper & The Innocent Criminals
    Breakin' Down

    Played: 11 May 2018, 00:19

  • The Smiths
    What Difference Does It Make?

    Played: 11 May 2018, 00:16

  • Pink Floyd
    Speak To Me / Breathe In The...

    Played: 11 May 2018, 00:12

  • Radiohead
    Bangers & Mash

    Played: 11 May 2018, 00:08

  • Black Star
    Re:Definition

    Played: 11 May 2018, 00:05

Meta

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

RSS Feed Google+ Facebook Twitter