473,395 Members | 1,678 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,395 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 1373
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

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...
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
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...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.