methods hint balloons

  • Thread starter Thread starter Tim Wallace
  • Start date Start date
T

Tim Wallace

I was wondering if someone could refresh my memory on how to comment a
user-defined method to display the same kind of method description as are
displayed for native methods when the user mouses over a method in the IDE.
I know one used to be able to do this in VC++, but I forget.

Tim
 
Tim,

In order to do this, you need to provide XML documentation for your
methods (look up xml comments or xml documentation in the MSDN library).
Once you do that, you can compile your assembly with the /doc switch turned
on (which you can set in the project properties for your project). Name the
xml file the same name as your assembly, except with an XML extension and
not a dll/exe extension. Once you do that, you can place that XML file in
the same place as your DLL. When you set a reference to that dll, VS.NET
will pick up the XML file and will show the comments you made in
intellisense.

Hope this helps.
 
Nicholas:

Thanks for your reply.

It seems to me that this was much easier to do in VC6. If memory serves,
one simply had to include a //* or /** or some such convention in the header
file followed by the description. Then, anywhere in your application when
you moused over a call to the method, intellisense would display that
user-defined method description.

Tim

Nicholas Paldino said:
Tim,

In order to do this, you need to provide XML documentation for your
methods (look up xml comments or xml documentation in the MSDN library).
Once you do that, you can compile your assembly with the /doc switch
turned on (which you can set in the project properties for your project).
Name the xml file the same name as your assembly, except with an XML
extension and not a dll/exe extension. Once you do that, you can place
that XML file in the same place as your DLL. When you set a reference to
that dll, VS.NET will pick up the XML file and will show the comments you
made in intellisense.

Hope this helps.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Tim Wallace said:
I was wondering if someone could refresh my memory on how to comment a
user-defined method to display the same kind of method description as are
displayed for native methods when the user mouses over a method in the
IDE. I know one used to be able to do this in VC++, but I forget.

Tim
 
It seems to me that this was much easier to do in VC6. If memory serves,
one simply had to include a //* or /** or some such convention in the header
file followed by the description. Then, anywhere in your application when
you moused over a call to the method, intellisense would display that
user-defined method description.

You only need to worry about producing the XML file if you want
intellisense when using the DLL from other solutions. If it's within
the same solution, just put the XML comments in (just hit /// and
VS.NET will produce a skeleton for you) and all should be well.
 
Jon:

Thanks for the input. I'll check it out. Do you know if this also works in
Visual C# 2005 Express Edition?

Tim
 
Thanks for the input. I'll check it out. Do you know if this also works in
Visual C# 2005 Express Edition?

I don't know, I'm afraid, but I expect it probably does. Give it a try
:)
 
Back
Top