Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Enum Inheritance solution [duplicate]

Possible Duplicate:
Enum “Inheritance”

I've been trying to do something like inheritance in Enum. I wanted a base Enum with multiple values from different Enums.

the best approach will be answered below.

like image 553
Ruba Avatar asked Nov 28 '12 07:11

Ruba


1 Answers

Enum is a value type and consequently sealed, i.e. cannot be inherited. See also Enum “Inheritance”

like image 109
horgh Avatar answered Oct 06 '22 10:10

horgh