foreach with enum

Extrawurst spam at extrawurst.org
Thu Jul 19 13:29:05 PDT 2007


that would be a very nice feature indeed


Thomas Mader schrieb:
> 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