473,320 Members | 1,921 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 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,
Nov 19 '05 #1
2 977
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
Nov 19 '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


Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Mike | last post by:
Hi, If I declare an enumeration such as Public Enum EnumSomeFlags Flag1 = &H1 Flag2 = &H2 End Enum Public ReadOnly Property DevStatusFlags() As EnumLineSomeFlags
2
by: Francois | last post by:
Hi, This is probably a very easy question...but I just don't know the answer... I want to shorten this script: document.formulier.form_o_stoel1.checked = false;...
4
by: B.J. | last post by:
Hi, Is there any way how I can shorten following code ? try {...} catch(FormatException) {SAME CODE IN ALL CATCH BLOCKS} catch(OverflowException) {SAME CODE IN ALL CATCH BLOCKS} E.g. to...
8
by: ben | last post by:
i have a bit of code, that works absolutely fine as is, but seems over complicated/long winded. is there anyway to shorten/simplify it? the code is below. description of it: it's like strcpy in...
1
by: Web Response Time | last post by:
I found a surprising problem. I sent a zero length's request in my asp.net program to another asp.net program on the local machine. until I received the zero length's response data, it only took...
3
by: UKuser | last post by:
Hi, Is there a way to shorten this line if ((ereg(".jpg",$filename))||(ereg(".eps",$filename))||(ereg(".tif", $filename))||(ereg(".tiff",$filename))||(ereg(".jpeg",$filename))||...
5
by: Dean | last post by:
Hi, I have a table with non-unique identifiers. I need to take all the values with the same ID's and combine them into one field with a semicolon as a seperator. These values may exceed 255...
2
by: pauldepstein | last post by:
Suppose a vector taking elements in SomeClass is resized from length 5 to length 8 using the resize method. SomeClass is a class which takes a variety of constructors SomeClass contains a...
3
by: moomooboy | last post by:
guys please help me T_T im currently stuck on string, it takes too many line. here is my sample: char breadmenu; strcpy (breadmenu,"Parmasan"); strcpy (breadmenu,"Gralic"); strcpy...
1
by: treeguy | last post by:
I am not a developer but my site has long URL strings that have problem getting crawled. I understand Google now will crawl past the + but does not like the long strings. I tried URL rewrite and it...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.