How do you add intelli-sense tool-tip comments to object properties?

  • Thread starter Thread starter Christopher Kowalski
  • Start date Start date
C

Christopher Kowalski

If you notice, most Microsoft objects include a comment in the tool-tip that
shows up when using intelli-sense auto-completion that describes that
property or method. How can I add such comments to my own objects?



You'd think that was easy to do, but I just can't figure it out!



Thanks for any help!



Chris
 
If you notice, most Microsoft objects include a comment in the
tool-tip that shows up when using intelli-sense auto-completion that
describes that property or method. How can I add such comments to my
own objects?

The intellisense comments are extraced from the xml comments.

///<summary>some description</summary>
///<param name="a">my param description</param>
public void somefunction(int a)
{
}
 
Thanks Peter, but that does work for me.

Typing in "///" does bring up the empty XML comments, but if I fill them in,
those comments don't end-up showing-up in the intellisense tooltip when
using that object from another project. Maybe there's some build setting
that required for this to work?

Thanks and regards,

Chris
 
Thanks Peter, but that does work for me.

Typing in "///" does bring up the empty XML comments, but if I fill
them in, those comments don't end-up showing-up in the intellisense
tooltip when using that object from another project. Maybe there's
some build setting that required for this to work?

Thanks and regards,

Chris

I'm not sure, but could be that you have to include the attr.
BrowsableAttribute.

I've used this with custom controls and it always worked perfectly.
 
Peter,
Make sure that you have set 'XML Documentation File Path' in the
project's Configuration Properties for the release and debug items. This
will cause the project to build the associated documentation file for
Intellisense.

Ron Allen
 
Once you've added the comments change the 'Configuration
Properties->Build->XML Documentation File' project property. The name
should be TheNameOfYourAssembly.xml.

When you add a reference to an assembly, intellisense will look for this
xml file at the same location where the assembly is, if there's such a file
it will copy it to the project's reference directory and it will show the
comments in intellisense.

You should provide your xml file alongside your assembly when doing
development.
 
Back
Top