Check out example codes for "c# foreach enum". It will help you in understanding the concepts better.

Code Example 1

foreach (Suit suit in (Suit[]) Enum.GetValues(typeof(Suit)))
{
}

Code Example 2

public enum Days {
  Monday,
  Tuesday,
  Wednesday
}

foreach(Days day in Enum.GetValues(typeof(Days))) {
  
}

Code Example 3

enum Foos {
  Foo,
  Bar,
}

foreach(Foos val in Enum.GetValues(typeof(Foos))) {}

Learn ReactJs, React Native from akashmittal.com