Created
December 28, 2011 09:15
-
-
Save JoanComasFdz/1527253 to your computer and use it in GitHub Desktop.
Getting the string value of an string enumerator and parsing it again.
This file contains hidden or 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
// Get the value from the first member of the enumerator. | |
string value = StringEnum<MyStringEnum>.Value(MyStringEnum.Member1); | |
// Parse the value to re-obtain the member. | |
MyStringEnum member = StringEnum<MyStringEnum>.Parse(value); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment