Created
July 8, 2013 15:08
-
-
Save dgroft/5949657 to your computer and use it in GitHub Desktop.
Parsing an enum.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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