Answers for "c# loop enums"

C#
10

loop through an enum c#

public enum Days {
  Monday,
  Tuesday,
  Wednesday
}

foreach(Days day in Enum.GetValues(typeof(Days))) {
  
}
Posted by: Guest on May-21-2020
1

c# iterate enum

var values = Enum.GetValues(typeof(Foos));
Posted by: Guest on January-09-2021

C# Answers by Framework

Browse Popular Code Answers by Language