Answers for "iterate over enum"

1

loop over enum values

var values = Enum.GetValues(typeof(EnumName));

foreach (var value in values)
{
	Combobox.Items.Add(value.ToString());
}
Posted by: Guest on May-21-2020
0

iterate over enum java

for (DaysOfWeekEnum day : DaysOfWeekEnum.values()) { 
    System.out.println(day); 
}
Posted by: Guest on July-15-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language