enum foreach in c# code example Example: c# foreach enum enum Foos { Foo, Bar, } foreach(Foos val in Enum.GetValues(typeof(Foos))) {}