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. .NET (Core and Framework)
  4. My own class & IntelliSense

My own class & IntelliSense

Scheduled Pinned Locked Moved .NET (Core and Framework)
visual-studio
8 Posts 5 Posters 1 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.
  • M Offline
    M Offline
    Maciej Pirog
    wrote on last edited by
    #1

    Hi everyone! I'm trying to add some description to my classes' function that should appear next to IntelliSense list or inside the Quick Info box. :confused: Thanks! MP Maciej Pirog

    R T 2 Replies Last reply
    0
    • M Maciej Pirog

      Hi everyone! I'm trying to add some description to my classes' function that should appear next to IntelliSense list or inside the Quick Info box. :confused: Thanks! MP Maciej Pirog

      R Offline
      R Offline
      Rama Krishna Vavilala
      wrote on last edited by
      #2

      In C# add XML Comments to your class. This will work.

      M L 2 Replies Last reply
      0
      • R Rama Krishna Vavilala

        In C# add XML Comments to your class. This will work.

        M Offline
        M Offline
        Maciej Pirog
        wrote on last edited by
        #3

        Thank you very much! That's what I wanted!:rolleyes: MP Maciej Pirog

        1 Reply Last reply
        0
        • R Rama Krishna Vavilala

          In C# add XML Comments to your class. This will work.

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

          Hi rama, How can I add such intellisense for proprties/Methods in a User Defined Control ? I tried the Description Attribute. But it shows the description only in the properties window. How can I get it in the CodeWindow I want the descriptions about the Properties, Methods etc exposed from my Control to be visible also in the Code Window to the developer using the control (Just like it works for the Standard controls) Thanks Firoz

          J 1 Reply Last reply
          0
          • L Lost User

            Hi rama, How can I add such intellisense for proprties/Methods in a User Defined Control ? I tried the Description Attribute. But it shows the description only in the properties window. How can I get it in the CodeWindow I want the descriptions about the Properties, Methods etc exposed from my Control to be visible also in the Code Window to the developer using the control (Just like it works for the Standard controls) Thanks Firoz

            J Offline
            J Offline
            James T Johnson
            wrote on last edited by
            #5

            The summary tag will be what is shown when the name is chosen in Intellisense, the param tag tells it what to show for each parameter. Here's an example, copied from one project on my hard drive

            /// <summary>
            /// <para> Removes a specific File from the FileCollection.</para>
            /// </summary>
            /// <param name='value'>The File to remove from the FileCollection.</param>
            /// <returns><para>None.</para></returns>
            public void Remove(File value) {
            List.Remove(value);
            }

            The <para></para> tags are for formatting in utilities that take the XML documentation to spit out other documents, as far as I can tell it is ignored by Intellisense. It works the same for properties, except you don't use the <param> tags unless its an indexer. HTH, James

            L 1 Reply Last reply
            0
            • J James T Johnson

              The summary tag will be what is shown when the name is chosen in Intellisense, the param tag tells it what to show for each parameter. Here's an example, copied from one project on my hard drive

              /// <summary>
              /// <para> Removes a specific File from the FileCollection.</para>
              /// </summary>
              /// <param name='value'>The File to remove from the FileCollection.</param>
              /// <returns><para>None.</para></returns>
              public void Remove(File value) {
              List.Remove(value);
              }

              The <para></para> tags are for formatting in utilities that take the XML documentation to spit out other documents, as far as I can tell it is ignored by Intellisense. It works the same for properties, except you don't use the <param> tags unless its an indexer. HTH, James

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

              hi James, You are right. The intellisense shows the summary contents. But it doesnt seem to work in case of a User Control. When I make a Control (attaching the Summary tags for my custom properties and methods) and, then use that control in another application, the intellisense doesnt show the Summary Contents for the Properties or Methods. Does the information in the summary tag go into the final executable as Metadata ? Thanks Firoz

              J 1 Reply Last reply
              0
              • L Lost User

                hi James, You are right. The intellisense shows the summary contents. But it doesnt seem to work in case of a User Control. When I make a Control (attaching the Summary tags for my custom properties and methods) and, then use that control in another application, the intellisense doesnt show the Summary Contents for the Properties or Methods. Does the information in the summary tag go into the final executable as Metadata ? Thanks Firoz

                J Offline
                J Offline
                James T Johnson
                wrote on last edited by
                #7

                Ah, no it doesn't I forgot about that :-O You need to place the resulting .xml file in a certain directory. I believe you place it in the same directory as the assembly you are referencing, if you go into your Windows\Microsoft.NET\v1.0.3075\ directory you should see several .xml files there containing the information about the Framework. James

                1 Reply Last reply
                0
                • M Maciej Pirog

                  Hi everyone! I'm trying to add some description to my classes' function that should appear next to IntelliSense list or inside the Quick Info box. :confused: Thanks! MP Maciej Pirog

                  T Offline
                  T Offline
                  thenutz72
                  wrote on last edited by
                  #8

                  Does anyone know if you can do something similar within the same class? i.e. When calling a function from within the same class you can type ( or , and that tooltip pops up with the parameter list. Is there anyway to get that summary info to display in there? The tooltip might show " int MyFunction(int,int) ". I guess I'm looking to see something like " int MyFunction(int MaxValue,int MinValue) ". Thanks.

                  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