So I have this enum:
VB Code:
Public Enum xyz x = 1 y = 2 z = 5 End Enum
And i want to have a Select Case that checks for any of the values in the enum (1,2,5) but I don't want to write out a case statement for each enumeration item. I would like to just write one case statement to determine if the value is in the enumeration like:
VB Code:
Select Case myInt Case In [Enum].GetValues(GetType(enuTopChainTypes)) End Select
Obviously this doesn't work, but I thing I am close. Anyone know how to do this?




Reply With Quote