foreach enum complex value c# code example
Example 1: c# foreach enum
enum Foos {
Foo,
Bar,
}
foreach(Foos val in Enum.GetValues(typeof(Foos))) {}
Example 2: foreach enum
foreach (MyEnum enumValue in (MyEnum[]) Enum.GetValues(typeof(MyEnum)))
{
}