Possible Duplicate:
How do I enumerate an enum?
Suppose there is an enum
public enum Numbers {one, two, three };
What do I have to write instead of the three dots in the following code in order to get output "one", "two", "three":
foreach (Numbers n in ...) {
Console.WriteLine (n.ToString ());
}
Of course, I would like to do it in a way such that modifying the enum definition does not require modification of the code within the foreach ( ).