Defining Subsets

  • Thread starter Thread starter Chad
  • Start date Start date
C

Chad

I'd like to define a set of enums that must be a subset of other enums. Something like this:

Public Enum AllErrorNumbers As Integer
Error1 = 1
Error2 = 2
Error3 = 3
End Enum
Public Enum ErrorsForThisScreen As AllErrorNumbers
Error1 = 1
Error2 = 2
End Enum

Does anything in VB come close?

Thanks
 
Chad said:
I'd like to define a set of enums that must be a subset of other enums.
Something like this:

Public Enum AllErrorNumbers As Integer
Error1 = 1
Error2 = 2
Error3 = 3
End Enum
Public Enum ErrorsForThisScreen As AllErrorNumbers
Error1 = 1
Error2 = 2
End Enum

Does anything in VB come close?


\\\
Public Enum AllErrorNumbers
Error1 = 1
Error2 = 2
Error3 = 3
End Enum

Public Enum ErrorsForThisScreen
Error1 = AllErrorNumbers.Error1
Error2 = AllErrorNumbers.Error2
End Enum
///
 

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

Back
Top