How do I iterate over enum members at runtime?

Jesse Phillips jessekphillips+D at gmail.com
Sat Apr 9 18:38:02 PDT 2011


Andrej Mitrovic Wrote:

> It's a shame that an enum with a tag doesn't have a .length property.
> I've had to use __traits to build an array just to get the length.

It has .max

http://www.digitalmars.com/d/2.0/enum.html


More information about the Digitalmars-d-learn mailing list