how to 'or' two enums?

Trying to convert some older RB code, and need to ‘or’ two enum integer values together. Right now I’m getting an error that says “Or” hasn’t been defined for that type. The LR or Framework guide doesn’t seem to address this.

The easiest way is to cast the enum values as integers.

Dim value As Integer = Integer(EnumValue1) Or Integer(EnumValue2)

Or dont define them as enums.
Define them as integer constants

eg VB enum

enum Animal
Dog =1
Cat =2
end enum

becomes

Animal_Dog as integer =1
Animal_Cat as integer =2

Thanks for the replies. I tried to use casting but I need to return the value as an ENUM of the same type. I’ll try using constants in a module.

dim value as MyEnum = MyEnum( Integer( EnumValue1 ) or Integer( EnumValue2 ) )

[quote=204457:@Kem Tekinay] dim value as MyEnum = MyEnum( Integer( EnumValue1 ) or Integer( EnumValue2 ) ) [/quote]

Thanks Kem, that did the trick.