Tooltip for custom class properties/methods

S

Scott M.

How do I add information to a custom class's properties and methods so that
when an instance of the class is made the VS.NET intelliSense will show the
information in a tooltip as the members are browsed from the drop-down list.

Is this done by marking the property/method with some attribute? If so,
which and how?
 
H

Herfried K. Wagner [MVP]

Scott M. said:
How do I add information to a custom class's properties and methods so that
when an instance of the class is made the VS.NET intelliSense will show the
information in a tooltip as the members are browsed from the drop-down list.

My XML Comments FAQ:

VB Commenter
<http://www.gotdotnet.com/team/ide/>
-> section "VB Commenter"

XML Documentation
<http://www.gotdotnet.com/team/vb/>
-> section "XML Documentation"

VBXC - VB.NET XML Commentor
<http://vbxmldoc.tor-erik.net/index.shtml>

NDOC (formerly DOC.NET)
<http://ndoc.sourceforge.net/>

VB.DOC
<http://vb-doc.sourceforge.net/>
 
S

Scott M.

Thanks Herfried, but I'm not looking for a tool to do this for me, I'd like
to know how to manually make this happen.
 
S

Scott M.

Thanks Tian, but I'd like to know how to do this myself. I'm not looking
for a tool that does it for me.
 
T

Tian Min Huang

Hi Scott,

Thanks for your feedback. I strongly recommend you use C# instead of Visual
Basic .NET if you want to do it yourself. As you know, Visual Studio .NET
provides more XML comments functionality to C# code:

Adding Comments in C# Code
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vsintro7/ht
ml/vxtskaddingcommentsincode.asp

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
S

Scott M.

Thanks for your reply Tian, but, as I said, I am looking to find out how to
do this myself (without a tool) and in VB .NET, not C#.

Can you help me with this?
 
H

Herfried K. Wagner [MVP]

Scott M. said:
Thanks for your reply Tian, but, as I said, I am looking to find out how to
do this myself (without a tool) and in VB .NET, not C#.

You will have to use a tool or write it on your own. I have posted some
links to open source tools for doing that previously.
 
S

Scott M.

Again, thank you for your reply Herfried, but I am being as clear as I can
be on this: I do not want to use a tool, so the links you provided won't
help me. I do want (as you indicated below) to do this myself.

Do you have information on how this is accomplished or not?
 
H

Herfried K. Wagner [MVP]

Scott M. said:
Again, thank you for your reply Herfried, but I am being as clear as I can
be on this: I do not want to use a tool, so the links you provided won't
help me. I do want (as you indicated below) to do this myself.

Do you have information on how this is accomplished or not?

Again: Have a look at the implementation of the tools mentioned before. Some of them come with source code.
 
S

Scott M.

Thanks, but I think it's clear that you don't understand my post.


Herfried K. Wagner said:
Again: Have a look at the implementation of the tools mentioned before.
Some of them come with source code.
 
H

Herfried K. Wagner [MVP]

Scott M. said:
Thanks, but I think it's clear that you don't understand my post.

ACK. I don't understand what exacltly you want to to. Maybe you can
provide more details...

:)
 
T

Tian Min Huang

Hello Scott,

I appologize that I am not quite sure what you mean by "find out how to do
this myself". Unlike C#, Visual Basic .NET compiler does not natively
support XML comments to the code. As you know, there are a number tools
existing to add such functionality to Visual Basic .NET.

Do you want to create a similar tool of your own? If so, you will need to
create a Visual Studio .NET Add-In of your own. When Visual Studio .NET IDE
will build a Visual Basic .NET application, your Add-In utility need to
perform the following tasks:

1. Scan and extract the comments from the VB source files.
2. Parse the information following the XML comment format.
3. Emits the result.

To achieve these steps, you will be familiar with VS .NET Add-In, XML
comment format, IL and assembly. As you know, it's time consuming and I
strongly recommend you make use one of existing tools.

Please feel free to let me know if you have any problems or concerns.

Have a nice day!
Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
 
S

Scott M.

Thanks Tian, this finally answers my question. I was unaware that VB.NET
does not support XML comments. Now, I understand why this must be done in
C#.
 

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