Enumerate an Enum

Published 12/2/2014 by Christian in Code syntax
Tags:

Very simple but I keep forgetring:

foreach (AnEnum e in Enum.GetValues(typeof(AnEnum)))

As always, feel free to comment, or ask.


Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading