enum inheritance?
Jonathan M Davis
jmdavisProg at gmx.com
Sat Aug 13 16:50:31 PDT 2011
On Saturday, August 13, 2011 23:15:29 mimocrocodil wrote:
> Hi!
>
> I am want to extend available enum to provide more items to them.
>
> How I can do this job without manual copying of exsisting enum items?
You can't. An enum has a fixed set of values. You can't extend it in any way,
shape, or form. You can create other enums, but you can't do anything to add
new values to the original unless you go and alter the enum declaration to add
more values. And if you create a new enum, you can't use it in place of the
old enum, because it's not the same enum and doesn't have the same values.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list