How do I shorten Someclass.Class.SOMEFLAG to just SOMEFLAG

  • Thread starter Thread starter Mike
  • Start date Start date
M

Mike

Hi,

If I declare an enumeration such as

Public Enum EnumSomeFlags
Flag1 = &H1
Flag2 = &H2
End Enum

Public ReadOnly Property DevStatusFlags() As EnumLineSomeFlags
Get
'Do Stuff
LineDevStatusFlags = m_DevStatusFlags()
End Get
End Property

When I use the property I get the whole enumvalue. Ie

DevStatus = SomeClass.Class1.Flag1

When all I want to see is

DevStatus = Flag1

Any way to do this.

Thanks,
 
When I use the property I get the whole enumvalue. Ie
DevStatus = SomeClass.Class1.Flag1

When all I want to see is
DevStatus = Flag1

At the top of your source, use an imports statement:

import SomeClass.Class1.EnumSomeFlags


Then you should be able to just refer to Flag1 (as long as there are no
naming conflicts with something else)

Chris
 
Back
Top