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. C#
  4. How to set Property description?

How to set Property description?

Scheduled Pinned Locked Moved C#
helptutorialquestion
6 Posts 3 Posters 0 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
    kmuthuk
    wrote on last edited by
    #1

    Hi Guys How to set a description for a property in a class? I have found some articiles talking about method description using summary tag. summary.../summary. But it doesn't seem to be working for properties. Can any one help me on this? Thanks in advance. Muthu.

    P L 2 Replies Last reply
    0
    • K kmuthuk

      Hi Guys How to set a description for a property in a class? I have found some articiles talking about method description using summary tag. summary.../summary. But it doesn't seem to be working for properties. Can any one help me on this? Thanks in advance. Muthu.

      P Offline
      P Offline
      Pete OHanlon
      wrote on last edited by
      #2

      Muthu You do use the summary tag. This is an example:

      /// <summary;>
      /// Get or set the Id.
      /// </summary;>
      /// <remarks;>
      /// The Id must be a positive value.
      /// </remarks;>
      public int Id
      {
        get { return _id ; }
        set { _id = value; }
      }
      

      the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
      Deja View - the feeling that you've seen this post before.

      K 1 Reply Last reply
      0
      • K kmuthuk

        Hi Guys How to set a description for a property in a class? I have found some articiles talking about method description using summary tag. summary.../summary. But it doesn't seem to be working for properties. Can any one help me on this? Thanks in advance. Muthu.

        L Offline
        L Offline
        Luc Pattyn
        wrote on last edited by
        #3

        The properties shown by Visual Designer are not from the /// tags, but from the Description attribute, which is unfortunate, since this makes me write the same thing twice, as in: using System.ComponentModel; // Category, Description /// /// Gets or sets the initial color of the overlay. /// Use Color.Transparent to make it always transparent, or /// some opaque color to get the scratch functionality. /// [Category("ScratchPanel"), Description("Gets of sets the initial color of the overlay. "+ "Use Color.Transparent to make it always transparent, or "+ "some opaque color to get the scratch functionality.")] public override Color ForeColor { ... } :) Luc Pattyn

        K 1 Reply Last reply
        0
        • L Luc Pattyn

          The properties shown by Visual Designer are not from the /// tags, but from the Description attribute, which is unfortunate, since this makes me write the same thing twice, as in: using System.ComponentModel; // Category, Description /// /// Gets or sets the initial color of the overlay. /// Use Color.Transparent to make it always transparent, or /// some opaque color to get the scratch functionality. /// [Category("ScratchPanel"), Description("Gets of sets the initial color of the overlay. "+ "Use Color.Transparent to make it always transparent, or "+ "some opaque color to get the scratch functionality.")] public override Color ForeColor { ... } :) Luc Pattyn

          K Offline
          K Offline
          kmuthuk
          wrote on last edited by
          #4

          I'm sorry. I didn't mention that it is for intellisense description. I tried both ///summary and System.ComponentModel I didn't get intellisense description in both cases. Thanks Muthu.

          L 1 Reply Last reply
          0
          • P Pete OHanlon

            Muthu You do use the summary tag. This is an example:

            /// <summary;>
            /// Get or set the Id.
            /// </summary;>
            /// <remarks;>
            /// The Id must be a positive value.
            /// </remarks;>
            public int Id
            {
              get { return _id ; }
              set { _id = value; }
            }
            

            the last thing I want to see is some pasty-faced geek with skin so pale that it's almost translucent trying to bump parts with a partner - John Simmons / outlaw programmer
            Deja View - the feeling that you've seen this post before.

            K Offline
            K Offline
            kmuthuk
            wrote on last edited by
            #5

            I'm sorry. I didn't mention that it is for intellisense description. I tried both ///summary and System.ComponentModel I didn't get intellisense description in both cases. Thanks Muthu.

            1 Reply Last reply
            0
            • K kmuthuk

              I'm sorry. I didn't mention that it is for intellisense description. I tried both ///summary and System.ComponentModel I didn't get intellisense description in both cases. Thanks Muthu.

              L Offline
              L Offline
              Luc Pattyn
              wrote on last edited by
              #6

              Yes you are right, there is an issue. I havent noticed this before: Visual Studio 7.1 does not show Intellisense for properties (it does for methods e.a.), but Visual Studio 8.0 does ! :)

              Luc Pattyn

              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