Inherit ENUM

D

Dave Wurtz

All,

Is there anyway to inherit from an Enum and/or to add items to them outside
of the Enum statement?

Public Class Class1
Public Enum Test
Value1 = 1
Value 2 = 2
End Enum
End Class

Public Class Class2
inherits Class1

'How can I add class2-specific values to the Test enum?

End Class


Thanks.

Dave Wurtz
 
R

Rob Teixeira [MVP]

Nope. Enums are Value Types. Value Types cannot be derrived from, only
Reference Types.

-Rob Teixeira [MVP]
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top