Skip to content

Instantly share code, notes, and snippets.

@JoanComasFdz
Created December 28, 2011 09:15
Show Gist options
  • Save JoanComasFdz/1527253 to your computer and use it in GitHub Desktop.
Save JoanComasFdz/1527253 to your computer and use it in GitHub Desktop.
Getting the string value of an string enumerator and parsing it again.
// 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