471,624 Members | 1,833 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,624 software developers and data experts.

Overridable limitations for Enumerations

I'm making an Base Class that will be inherited. In my base class, I
have a public enumeration that defines a list of things I want my class
to be able to do. I use it for Method input parameters, as well as
output Events.

Public Enum enmListOfValues
End Enum

....It works really great, because it allows me to have AutoSyntax
completion in the child classes that inherit from it. Makes for very
readible code.

However, there is a problem. I'm only able to use the Enumerations I
set up in my Base class. ...And what I would like to do on occasion,
is to have one of my Child Classes "Override" this, and feed in it's
own list of enmListofValues for the Classes that inherit from it.

....But it doesn't work. Overriding isn't allowed for Enumerations.

The best I can come up with, is to make a Public Integer Property in my
Base Class, and then Declare an Enum in each Child Class, as needed,
and CType() it. ...What a drag.

Does anyone have a better solution for this? ...I want my
AutoComplete. It's so dang useful. ...But I also want to either be
able to dynamically add to the Enumeration in my base class, or
Override it. ...And Shadows isn't any good. Because I want to have
other classes inherit from the class I redefine the Enumerations in.

Anyone encounter this, or have any ideas? Your help would be greatly

Jul 21 '05 #1
0 1078

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by someone else | last post: by
4 posts views Thread by ChrisB | last post: by
reply views Thread by Plinkerton | last post: by
77 posts views Thread by Ben Finney | last post: by
2 posts views Thread by MDFS | last post: by
3 posts views Thread by grawsha2000 | last post: by
11 posts views Thread by Ido Yehieli | last post: by
1 post views Thread by ZEDKYRIE | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.