Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Studio
  4. Hide Member In Object Explorer

Hide Member In Object Explorer

Scheduled Pinned Locked Moved Visual Studio
csharphelpquestion
9 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    Kevin Marois
    wrote on last edited by
    #1

    Back in my Visual FoxPro days there were attributes that you could attach to a class member to hide it from the object explorer. Is this possible in .Net? If so, how? Thank you

    If it's not broken, fix it until it is

    Richard DeemingR 1 Reply Last reply
    0
    • K Kevin Marois

      Back in my Visual FoxPro days there were attributes that you could attach to a class member to hide it from the object explorer. Is this possible in .Net? If so, how? Thank you

      If it's not broken, fix it until it is

      Richard DeemingR Offline
      Richard DeemingR Offline
      Richard Deeming
      wrote on last edited by
      #2

      I don't think you can hide members from the object explorer, but you can use the EditorBrowsable attribute[^] to suggest that members should be hidden in the intellisense list.


      "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

      "These people looked deep within my soul and assigned me a number based on the order in which I joined" - Homer

      K 1 Reply Last reply
      0
      • Richard DeemingR Richard Deeming

        I don't think you can hide members from the object explorer, but you can use the EditorBrowsable attribute[^] to suggest that members should be hidden in the intellisense list.


        "These people looked deep within my soul and assigned me a number based on the order in which I joined." - Homer

        K Offline
        K Offline
        Kevin Marois
        wrote on last edited by
        #3

        Ya I'v seen that. However, this HAS to be possible. Take a looks at a Microsoft or third party assembly. You don't see any private members listed.

        If it's not broken, fix it until it is

        L 1 Reply Last reply
        0
        • K Kevin Marois

          Ya I'v seen that. However, this HAS to be possible. Take a looks at a Microsoft or third party assembly. You don't see any private members listed.

          If it's not broken, fix it until it is

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          Which object-explorer? Did you mean the property-grid control?

          Kevin Marois wrote:

          You don't see any private members listed.

          Because it only shows public properties.

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

          K 1 Reply Last reply
          0
          • L Lost User

            Which object-explorer? Did you mean the property-grid control?

            Kevin Marois wrote:

            You don't see any private members listed.

            Because it only shows public properties.

            Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

            K Offline
            K Offline
            Kevin Marois
            wrote on last edited by
            #5

            The Object Browser

            If it's not broken, fix it until it is

            L 1 Reply Last reply
            0
            • K Kevin Marois

              The Object Browser

              If it's not broken, fix it until it is

              L Offline
              L Offline
              Lost User
              wrote on last edited by
              #6

              That's a property-grid control :)

              "A visual designer typically displays in the Properties window those members that either have no browsable attribute or are marked with the BrowsableAttribute constructor's browsable parameter set to true. These members can be modified at design time. Members marked with the BrowsableAttribute constructor's browsable parameter set to false are not appropriate for design-time editing and therefore are not displayed in a visual designer. The default is true."

              http://msdn.microsoft.com/en-us/library/system.componentmodel.browsableattribute(v=vs.110).aspx[^]

              Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

              K 1 Reply Last reply
              0
              • L Lost User

                That's a property-grid control :)

                "A visual designer typically displays in the Properties window those members that either have no browsable attribute or are marked with the BrowsableAttribute constructor's browsable parameter set to true. These members can be modified at design time. Members marked with the BrowsableAttribute constructor's browsable parameter set to false are not appropriate for design-time editing and therefore are not displayed in a visual designer. The default is true."

                http://msdn.microsoft.com/en-us/library/system.componentmodel.browsableattribute(v=vs.110).aspx[^]

                Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                K Offline
                K Offline
                Kevin Marois
                wrote on last edited by
                #7

                No it's not. View Menu, Object Browser

                If it's not broken, fix it until it is

                L 1 Reply Last reply
                0
                • K Kevin Marois

                  No it's not. View Menu, Object Browser

                  If it's not broken, fix it until it is

                  L Offline
                  L Offline
                  Lost User
                  wrote on last edited by
                  #8

                  I stand corrected, that's a whole editor. Don't know of any separate attributes to hide them, but the only place they'd be visible is to a developer. If you know of any class that can, that you can decompile the code using some freeware like Ilspy.

                  Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                  K 1 Reply Last reply
                  0
                  • L Lost User

                    I stand corrected, that's a whole editor. Don't know of any separate attributes to hide them, but the only place they'd be visible is to a developer. If you know of any class that can, that you can decompile the code using some freeware like Ilspy.

                    Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

                    K Offline
                    K Offline
                    Kevin Marois
                    wrote on last edited by
                    #9

                    I am also mistaken. I created a simple class with both Public and Private members. Only the public and Protected members showed up. Problem solved.

                    If it's not broken, fix it until it is

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups