Frank Jaeger
9
Q:

foreach enum

foreach (Suit suit in (Suit[]) Enum.GetValues(typeof(Suit)))
{
}
5
enum Foos {
  Foo,
  Bar,
}

foreach(Foos val in Enum.GetValues(typeof(Foos))) {}
3
foreach (MyEnum enumValue in (MyEnum[]) Enum.GetValues(typeof(MyEnum)))
{
}
0

New to Communities?

Join the community