Created
February 27, 2015 20:38
-
-
Save morbidcamel101/b44b465c9222f8868cc6 to your computer and use it in GitHub Desktop.
Example of how to loop an Enum
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
| for (int index = 0; Enum.IsDefined(typeof(InteractionTypeEnum), index); index++) // Nice! | |
| yield return new TaskItemType((InteractionTypeEnum)Enum.Parse(typeof(InteractionTypeEnum), index.ToString(CultureInfo.InvariantCulture))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment