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