Public Enum no longer public

G

Guest

Hi all,

We have a public enumeration in one module of our code. It's declared like
this:

Public Enum CardReaderState as Integer
Waiting_For_Card = 0
Card_In_Reader = 1
End Enum

(of course, there are enumerations in the real code). All has been working
fine in Visual Studio 2003.

Now we're slowly migrating to VS2005. One of my collegues is checking out
modules and changing small things (making sure all constants are declared
with a type, etc) and checking that back into SourceSafe. In the meantime,
I'm continuing support for the 2003 version of the program (with the changes
he's made).

Somtime in the last week or so (and I'm not at ALL convinced that it's
related to the 2005 move) modules in my code don't recognize this public
enumeration unless I either 1) fully qualify the name of the enumeration
(i.e., instead of using CardReaderState.Waiting_For_Card, I have to use
sg.modControlBoardComm.CardReaderState.Waiting_For_Card) or 2) I can do an
"imports sg.modControlBoardComm" at the top of the other module.

I can't figure out why this public enumeration is no longer visible to other
modules. I thought that was the whole reason for "public". Help?
 
I

Ilya Tumanov [MS]

Actually that's the way it supposed to be - either you specify full name or
you use Imports statement to set namespace or specify namespaces to import
in compiler's options.

It is still public or you won't be able to compile it even with full name or
Imports.

So why it used to work? May be a namespace change or imported namespace was
specified using compiler option.


--
Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top