It would be nice to be able to use enums in a hierarchical way:

enum colors
{
     enum Red { RedOrange, ... }
     enum Green { GreenBlue, ...}
     enum Blue { BlueYellow, ... }
...
}

which would be the same as the flattened version,

enum colors
{
Red, RedOrange, ..., Green, GreenBlue, ..., Blue, BlueYellow, ..., ...
}

but we could dereference such as

colors.Red.RedOrange,
colors.Blue,
colors.Green.GreenBlue,

(This isn't a great example but demonstrates what I would like to be able to do)

Is anything like this possible?

Reply via email to