473,386 Members | 1,720 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,386 software developers and data experts.

Making an Enum gloabl

In VB6, Enums that I declare within a class as PUBLIC are know outside of this class. In otehr words, the enum is global and may be referenced outside of the class in which it is declared.

In VB.Net, a Public enum is local to the class in which it is declared or instances of the class or classes that inherit from the class in which the Enum declaration resides.
Nov 20 '05 #1
16 8334
"Chad" <ch**************@unisys.com> schrieb
In VB6, Enums that I declare within a class as PUBLIC are know
outside of this class. In otehr words, the enum is global and may be
referenced outside of the class in which it is declared.

In VB.Net, a Public enum is local to the class in which it is
declared or instances of the class or classes that inherit from the
class in which the Enum declaration resides.


Use
Classname.Enumname
or
import the class
or
declare the Enum outside a class.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #2
"Chad" <ch**************@unisys.com> schrieb
In VB6, Enums that I declare within a class as PUBLIC are know
outside of this class. In otehr words, the enum is global and may be
referenced outside of the class in which it is declared.

In VB.Net, a Public enum is local to the class in which it is
declared or instances of the class or classes that inherit from the
class in which the Enum declaration resides.


Use
Classname.Enumname
or
import the class
or
declare the Enum outside a class.
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #3
This will also make your enum global

Public Module modDeclarations
Public Enum MyEnum
enumval01
enumval02
End Enum
End Module

"Chad" <ch**************@unisys.com> wrote in message
news:c5**********@trsvr.tr.unisys.com...
In VB6, Enums that I declare within a class as PUBLIC are know outside of
this class. In otehr words, the enum is global and may be referenced outside
of the class in which it is declared.

In VB.Net, a Public enum is local to the class in which it is declared or
instances of the class or classes that inherit from the class in which the
Enum declaration resides.
Nov 20 '05 #4
This will also make your enum global

Public Module modDeclarations
Public Enum MyEnum
enumval01
enumval02
End Enum
End Module

"Chad" <ch**************@unisys.com> wrote in message
news:c5**********@trsvr.tr.unisys.com...
In VB6, Enums that I declare within a class as PUBLIC are know outside of
this class. In otehr words, the enum is global and may be referenced outside
of the class in which it is declared.

In VB.Net, a Public enum is local to the class in which it is declared or
instances of the class or classes that inherit from the class in which the
Enum declaration resides.
Nov 20 '05 #5
Sapporo,
I tend to prefer:
Public Enum MyEnum
enumval01
enumval02
End Enum Public Module modDeclarations End Module
As the module is NOT needed to hold the Enum declaration. Enum declarations
can exist at the Namespace level just like Class, Module, Interface, and
Delegate.

Hope this helps
Jay

"Sapporo" <sa************@shackmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... This will also make your enum global

Public Module modDeclarations
Public Enum MyEnum
enumval01
enumval02
End Enum
End Module

"Chad" <ch**************@unisys.com> wrote in message
news:c5**********@trsvr.tr.unisys.com...
In VB6, Enums that I declare within a class as PUBLIC are know outside of
this class. In otehr words, the enum is global and may be referenced outside of the class in which it is declared.

In VB.Net, a Public enum is local to the class in which it is declared or
instances of the class or classes that inherit from the class in which the
Enum declaration resides.

Nov 20 '05 #6
Sapporo,
I tend to prefer:
Public Enum MyEnum
enumval01
enumval02
End Enum Public Module modDeclarations End Module
As the module is NOT needed to hold the Enum declaration. Enum declarations
can exist at the Namespace level just like Class, Module, Interface, and
Delegate.

Hope this helps
Jay

"Sapporo" <sa************@shackmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl... This will also make your enum global

Public Module modDeclarations
Public Enum MyEnum
enumval01
enumval02
End Enum
End Module

"Chad" <ch**************@unisys.com> wrote in message
news:c5**********@trsvr.tr.unisys.com...
In VB6, Enums that I declare within a class as PUBLIC are know outside of
this class. In otehr words, the enum is global and may be referenced outside of the class in which it is declared.

In VB.Net, a Public enum is local to the class in which it is declared or
instances of the class or classes that inherit from the class in which the
Enum declaration resides.

Nov 20 '05 #7
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> schrieb

As the module is NOT needed to hold the Enum declaration. Enum
declarations can exist at the Namespace level just like Class,
Module, Interface, and Delegate.


....which, Chad, you can find here:
http://msdn.microsoft.com/library/en...asp?frame=true

(6.4.2)
--
Armin

Nov 20 '05 #8
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> schrieb

As the module is NOT needed to hold the Enum declaration. Enum
declarations can exist at the Namespace level just like Class,
Module, Interface, and Delegate.


....which, Chad, you can find here:
http://msdn.microsoft.com/library/en...asp?frame=true

(6.4.2)
--
Armin

Nov 20 '05 #9
Armin,
Welcome back! long time no see.

Jay

"Armin Zingler" <az*******@freenet.de> wrote in message
news:40*********************@news.freenet.de...
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> schrieb

As the module is NOT needed to hold the Enum declaration. Enum
declarations can exist at the Namespace level just like Class,
Module, Interface, and Delegate.
...which, Chad, you can find here:

http://msdn.microsoft.com/library/en...asp?frame=true
(6.4.2)
--
Armin

Nov 20 '05 #10
Armin,
Welcome back! long time no see.

Jay

"Armin Zingler" <az*******@freenet.de> wrote in message
news:40*********************@news.freenet.de...
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> schrieb

As the module is NOT needed to hold the Enum declaration. Enum
declarations can exist at the Namespace level just like Class,
Module, Interface, and Delegate.
...which, Chad, you can find here:

http://msdn.microsoft.com/library/en...asp?frame=true
(6.4.2)
--
Armin

Nov 20 '05 #11
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> schrieb
Armin,
Welcome back! long time no see.


Had to recover from ugly quoting styles...

;-)
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #12
"Jay B. Harlow [MVP - Outlook]" <Ja************@msn.com> schrieb
Armin,
Welcome back! long time no see.


Had to recover from ugly quoting styles...

;-)
--
Armin

How to quote and why:
http://www.plig.net/nnq/nquote.html
http://www.netmeister.org/news/learn2quote.html

Nov 20 '05 #13
> Had to recover from ugly quoting styles...

LOL

Almost did quote it wrong

Cor
Nov 20 '05 #14
> Had to recover from ugly quoting styles...

LOL

Almost did quote it wrong

Cor
Nov 20 '05 #15
Armin,

* "Armin Zingler" <az*******@freenet.de> scripsit:
Welcome back! long time no see.


Had to recover from ugly quoting styles...


LOL

I had to recover too :-).

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #16
Armin,

* "Armin Zingler" <az*******@freenet.de> scripsit:
Welcome back! long time no see.


Had to recover from ugly quoting styles...


LOL

I had to recover too :-).

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 20 '05 #17

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

Similar topics

4
by: Chris | last post by:
I've lurked around long enough... Time to interract =) I'm trying to make sense of the following. I can't quite wrap my head around what this is actually doing: ------------- typedef enum {...
85
by: masood.iqbal | last post by:
I know that this topic may inflame the "C language Taleban", but is there any prospect of some of the neat features of C++ getting incorporated in C? No I am not talking out the OO stuff. I am...
26
by: Alexander Farber | last post by:
Hi, I have a UNIX-server written in C, which exchanges messages with Java clients. In the message the 1 byte is its length, the 2nd a player number and the 3rd byte is an event id: /* 0....
16
by: Chad | last post by:
In VB6, Enums that I declare within a class as PUBLIC are know outside of this class. In otehr words, the enum is global and may be referenced outside of the class in which it is declared. In...
90
by: Ben Finney | last post by:
Howdy all, How can a (user-defined) class ensure that its instances are immutable, like an int or a tuple, without inheriting from those types? What caveats should be observed in making...
3
by: yancheng.cheok | last post by:
hello all, how can i make, a forward declaration class's enum member, being visible by another class? consider the following case, ---------------------------- dog.h...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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:
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

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.