Can you Nest Enums?
Someone asked me "is there a way to nest Enums in .Net?" This crazy tree-of-life example is what i came up with... anyone got a better idea?
Namespace Enums
Enum Enums
unknown
End Enum
Namespace Animals
Namespace Mammals
Enum Domestic
cattle
pig
dog
sheep
cat
End Enum
Namespace primates
Enum Monkeys
spidermonkey
reesus
End Enum
Namespace apes
Namespace Greatapes
Enum humanoid
homosapien
neanderthal
End Enum
Enum Nonhumanoid
orangutan
mountaingorilla
chimpanzee
End Enum
End Namespace
Namespace lesserApes
Enum baboons
fatheadedbaboon
georgeWbush
End Enum
End Namespace
End Namespace
End Namespace
End Namespace
Enum Fish
cod
trout
End Enum
End Namespace
End Namespace
Enum Enums
unknown
End Enum
Namespace Animals
Namespace Mammals
Enum Domestic
cattle
pig
dog
sheep
cat
End Enum
Namespace primates
Enum Monkeys
spidermonkey
reesus
End Enum
Namespace apes
Namespace Greatapes
Enum humanoid
homosapien
neanderthal
End Enum
Enum Nonhumanoid
orangutan
mountaingorilla
chimpanzee
End Enum
End Namespace
Namespace lesserApes
Enum baboons
fatheadedbaboon
georgeWbush
End Enum
End Namespace
End Namespace
End Namespace
End Namespace
Enum Fish
cod
trout
End Enum
End Namespace
End Namespace
My book "Choose Your First Product" is available now.
It gives you 4 easy steps to find and validate a humble product idea.