471,122 Members | 1,125 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,122 software developers and data experts.

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

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,
Jul 17 '05 #1
2 1332
Mike <mi**@nospamplease.com> wrote in
news:uo********************************@4ax.com:

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

--
If you don't like lunchmeat, please remove it from my e-mail address to
send me an e-mail
Jul 17 '05 #2
Thanks Chris,

I figured this was the only way to do it.

Thanks again,

On Mon, 11 Aug 2003 12:35:26 -0700, Chris Dunaway
<dunawayc@_lunchmeat_sbcglobal.net> wrote:
Mike <mi**@nospamplease.com> wrote in
news:uo********************************@4ax.com :

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


Jul 17 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by Francois | last post: by
4 posts views Thread by B.J. | last post: by
1 post views Thread by Web Response Time | last post: by
3 posts views Thread by UKuser | last post: by
2 posts views Thread by pauldepstein | last post: by
1 post views Thread by treeguy | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.