M
Mythran
Option Strict On
Public Enum MyBitFields As Integer
MyValue1 = 1
MyValue2 = 2
MyValue3 = 4
MyValue4 = 8
End Enum
<STAThread()> _
Public Sub Main()
Dim bits As MyBitFields = MyBitFields.MyValue1 + MyBitFields.MyValue2
End Sub
The above code doesn't work because the Option Strict'ness doesn't allow the
conversion from integer to enumeration? Can someone help me with this?
Option Strict is required and I don't control the enumeration. I am
Implementing the IDTCommandTarget interface and the parameter StatusOption
(EnvDTE.vsCommandStatus enumeration) is byref. I need to set this ref value
to vsCommandStatus.vsCommandStatusEnabled +
vsCommandStatus.vsCommandStatusSupported.
By the way, by required I meant my own requirements. I can turn it off, but
why should I have to? Isn't there a way to get around this?
Any help would be appreciated....
Thank you,
Mythran
Public Enum MyBitFields As Integer
MyValue1 = 1
MyValue2 = 2
MyValue3 = 4
MyValue4 = 8
End Enum
<STAThread()> _
Public Sub Main()
Dim bits As MyBitFields = MyBitFields.MyValue1 + MyBitFields.MyValue2
End Sub
The above code doesn't work because the Option Strict'ness doesn't allow the
conversion from integer to enumeration? Can someone help me with this?
Option Strict is required and I don't control the enumeration. I am
Implementing the IDTCommandTarget interface and the parameter StatusOption
(EnvDTE.vsCommandStatus enumeration) is byref. I need to set this ref value
to vsCommandStatus.vsCommandStatusEnabled +
vsCommandStatus.vsCommandStatusSupported.
By the way, by required I meant my own requirements. I can turn it off, but
why should I have to? Isn't there a way to get around this?
Any help would be appreciated....
Thank you,
Mythran