Extending ENUM valus inherited from base object
Posted
by Tim
on Stack Overflow
See other posts from Stack Overflow
or by Tim
Published on 2010-06-14T09:30:12Z
Indexed on
2010/06/14
9:32 UTC
Read the original article
Hit count: 170
vb.net
Hi,
If I defined a ENUM in a base object with serveral default values. When I inherit from the base object I want to add more options the the ENUM list which are specific to the inheriting object.
For example my base could have a ENUM called Direction with values:
None
ALL
Stop
Start
I create a new class call Compass which inherits the base class and what to add the following to the ENUM Direction.
North
South
East
West
I create a new class call Navigation which inherits the base class and what to add the following to the ENUM Direction.
Left
Right
So, In my inheriting class haow do I extend the ENUM. I am using VB.NET.
Regards
© Stack Overflow or respective owner