Attributes for Intellisence in Visual Studio

G

Guest

I would like the objects/methods/properties I create to show informational
text in Visual Studio's Intellisense. For example, when a method shows up in
Intellisense, you see it's signature, but you will often see a description of
what the method does under its signature. I assume there is an attribute
needed for this, but I don't know which one. Anyone know?
 
R

Rory Becker

I would like the objects/methods/properties I create to show
informational text in Visual Studio's Intellisense. For example, when
a method shows up in Intellisense, you see it's signature, but you
will often see a description of what the method does under its
signature. I assume there is an attribute needed for this, but I don't
know which one. Anyone know?

Not an Attribute but XML comments

try

typing /// followed by a space for c#

or

typing ''' followed by a space for vb.net (assume VB2005 or better)
 
C

Chris Mullins [MVP - C#]

Motley said:
I would like the objects/methods/properties I create to show informational
text in Visual Studio's Intellisense. For example, when a method shows up
in
Intellisense, you see it's signature, but you will often see a description
of
what the method does under its signature. I assume there is an attribute
needed for this, but I don't know which one. Anyone know?

You're looking for XML Comments, which are present in both C# and VB.Net.

Essentially, you throw an "MyAssembly.dll.xml" in the same directory as
"MyAssembly.dll", and Visual Studio will match up the text with the methods
/ classes / properties, and use them in Intellisense.

http://blogs.msdn.com/ansonh/archive/2006/09/11/750056.aspx

To enable them, put XML Comments on your code, then check the right
check-box in the compiler settings for project options, and you're good.
 
G

Guest

You guys are great! Thanks!

Chris Mullins said:
You're looking for XML Comments, which are present in both C# and VB.Net.

Essentially, you throw an "MyAssembly.dll.xml" in the same directory as
"MyAssembly.dll", and Visual Studio will match up the text with the methods
/ classes / properties, and use them in Intellisense.

http://blogs.msdn.com/ansonh/archive/2006/09/11/750056.aspx

To enable them, put XML Comments on your code, then check the right
check-box in the compiler settings for project options, and you're good.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top