foreach with enum

Thomas Mader thezema at gmail.com
Thu Jul 19 13:14:59 PDT 2007


I am just porting some of my little Java programs to D to get comfortable with the langugage and realized that I cannot use foreach with Enums.
In Java I can do:
enum Color { Kreuz, Pik, Herz, Karo }
for(Color color : Color.values()) {}

AFAIK thats not possible in D yet.



More information about the Digitalmars-d mailing list