Answers for "c# iterate through enum values"

C#
4

Loop through enum C#

enum Foos {
  Foo,
  Bar,
}

foreach(Foos val in Enum.GetValues(typeof(Foos))) {
  //Do whatever with the value :D
}
Posted by: Guest on October-07-2020
1

c# iterate enum

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

Code answers related to "c# iterate through enum values"

C# Answers by Framework

Browse Popular Code Answers by Language