Skip to content

Instantly share code, notes, and snippets.

@dgroft
Created July 8, 2013 15:08
Show Gist options
  • Save dgroft/5949657 to your computer and use it in GitHub Desktop.
Save dgroft/5949657 to your computer and use it in GitHub Desktop.
Parsing an enum.
enum DaysOfTheWeek { Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday };
var tues = (DaysOfTheWeek)Enum.Parse(typeof(DaysOfTheWeek), "Tuesday");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment