traversing an enum c#

C#
var values = Enum.GetValues(typeof(Foos)).Cast<Foos>();
Source

Also in C#: