Intellisense

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ben R. Bolton

    #1

    Intellisense

    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


  • Ben R. Bolton

    #2
    Re: Intellisense

    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" <timhuang@onlin e.microsoft.com > wrote in message
    news:H9As9QIcDH A.1324@cpmsftng xa06.phx.gbl...[color=blue]
    > Hello Ben,
    >
    > Thanks for your response. Based on my research, there is a known issue[/color]
    that[color=blue]
    > enums embedded inside classes in C# may have problems with intellisense.[/color]
    As[color=blue]
    > 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
    >[/color]
    http://msdn.microsoft.com/library/en...ace.asp?frame=[color=blue]
    > 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[/color]
    rights.[color=blue]
    >[/color]


    Comment

    • Tian Min Huang

      #3
      Re: Intellisense

      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.


      Comment

      Working...