By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,601 Members | 1,116 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,601 IT Pros & Developers. It's quick & easy.

Intellisense

P: n/a
I have found that Intellisense sometimes works and sometimes doesn't. I
have yet to detect a consistant pattern, but have observed that if I define
a public enum in one project, that enum is accessable in other projects, but
it is not visible via intellisense. If I am working in the same project
the enum is visible via intellisense. How do I make an enum visible to
intellisense accross projects?
Ben
Jul 19 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Tian,

That is worth considering, though it does have some drawbacks. We currently
use the same enum name for each class. We then can qualify the enumeration
by it's class name when using it outside the class but without the
qualification within the class. Moving it to the name space level would
force us to incorporate the class name into the enum (or differentiate
through some other convention.) At this stage it is probably not worth the
effort, but we'll consider it for future projects.

Ben

"Tian Min Huang" <ti******@online.microsoft.com> wrote in message
news:H9**************@cpmsftngxa06.phx.gbl...
Hello Ben,

Thanks for your response. Based on my research, there is a known issue that enums embedded inside classes in C# may have problems with intellisense. As you know, putting public variables inside a class that will never be
instantiated may not be the best way to go. If you want all enums to be
global types, you should put them at namespace level. I have a link below
that has a little more details:

C# Programmer's Reference
namespace
http://msdn.microsoft.com/library/en...ace.asp?frame= true

I recommend you organize global types like enums to put them at the
namespace level as opposed to classes and then check whether or not the
problem still exists.

I am standing by for your response.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! C www.microsoft.com/security
This posting is provided as is with no warranties and confers no rights.

Jul 19 '05 #2

P: n/a
Hi Ben,

Thanks a lot for your response. In addition, I'd like to follow up with you
and see if there is any further I can help.

Have a nice day!

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! C www.microsoft.com/security
This posting is provided as is with no warranties and confers no rights.
Jul 19 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.