In the last post I described how you can cast an c# enumeration. In my second post I show how you can enumerate an enumeration. It is very simple. Let’s say we have an enum:
public enum CarManufacturer { BMW, Audi, VW }
Now you can easily get the names by:
foreach (string s in Enum.GetNames(typeof(CarManufacturer))) { System.Console.WriteLine(s); }