iterate over enum code example
Example 1: loop over enum values
var values = Enum.GetValues(typeof(EnumName));
foreach (var value in values)
{
Combobox.Items.Add(value.ToString());
}
Example 2: iterate through an enum java
for (enumerator s : enumerator.values()) {
// do abc
}
Example 3: java loop through enum
for (Direction dir : Direction.values()) {
// do what you want
}