Answered by:
Methods and parameter comments

Question
-
Hello
I am trying to create a standard procedure, which accepts a parameter:
Public Sub CreateWC(ByVal dtWC As DataTable ) ... ... ... End Sub
When the procedure name is typed, I would like to display a description for the method and the description for the parameter.
Is it called the intellisense?
For example if I type : INTEGER in vb.net, the intellisense (?) popsup with all the properties linked to INTEGER. If I then click on each propery e.g. Parse, the description is displayed for Parse.
I need to do the same. When the CreateWC is typed, I would like to display the description (e.g. "datatable must have 2 columns") of the parameter (dtWC).
How can I achieve this?
Any assistance is highly appreciated.
Thanks
Tuesday, February 9, 2010 11:36 AM
Answers
-
Yes in the code view. You need to select the whole name of your method. Then right mouse button click and in the context menu select add comment ( i guess it is add not insert, i have german version of VS)
Hannes
If you have got questions about this, just ask.
Mark the thread as answered if the answer helps you. This helps others who have the same problem !
C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/- Marked as answer by NaeemKhan Tuesday, February 9, 2010 3:13 PM
Tuesday, February 9, 2010 2:25 PM -
To create XML Documentation comments (comments that are used by the VS Intellisence feature) in your VB program
you type three apostrophes in a row ''' above a method definition.
This will generate the summary, parameter and return tags based on the signature of your method.
For this to work, you need to check the "Generate XML documentation file" box in the project settings>compile tab.- Proposed as answer by John Anthony Oliver Tuesday, February 9, 2010 2:52 PM
- Marked as answer by NaeemKhan Tuesday, February 9, 2010 3:14 PM
Tuesday, February 9, 2010 2:49 PM
All replies
-
Hi,
select your method name right mouse -> add/insert comment
Hannes
If you have got questions about this, just ask.
Mark the thread as answered if the answer helps you. This helps others who have the same problem !
C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/Tuesday, February 9, 2010 11:47 AM -
I don't add/insert comment when I write click after selecting the method.
I have acheived the what I wanted by adding the following lines on top of the method:
''' <summary>Creates very usefull useless stuff</summary> ''' <param name="dtWC">the description of WC is useless</param>
ThanksTuesday, February 9, 2010 12:08 PM -
You would have achieved the same if you had done like i wrote :-)
Hannes
If you have got questions about this, just ask.
Mark the thread as answered if the answer helps you. This helps others who have the same problem !
C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/Tuesday, February 9, 2010 12:09 PM -
Sorry what I meant was that when I right click on the method as you instructed I do not get the option of add/insert comment. Should I be selecting the method in code view?Tuesday, February 9, 2010 2:21 PM
-
Yes in the code view. You need to select the whole name of your method. Then right mouse button click and in the context menu select add comment ( i guess it is add not insert, i have german version of VS)
Hannes
If you have got questions about this, just ask.
Mark the thread as answered if the answer helps you. This helps others who have the same problem !
C# to VB.NET: http://www.developerfusion.com/tools/convert/csharp-to-vb/- Marked as answer by NaeemKhan Tuesday, February 9, 2010 3:13 PM
Tuesday, February 9, 2010 2:25 PM -
My mistake. I should have made it clear in the 1st post.
I do not get the add comment menu item in Custom Control project but I do get it in Windows Form. Very strange?
Thanks
Tuesday, February 9, 2010 2:37 PM -
To create XML Documentation comments (comments that are used by the VS Intellisence feature) in your VB program
you type three apostrophes in a row ''' above a method definition.
This will generate the summary, parameter and return tags based on the signature of your method.
For this to work, you need to check the "Generate XML documentation file" box in the project settings>compile tab.- Proposed as answer by John Anthony Oliver Tuesday, February 9, 2010 2:52 PM
- Marked as answer by NaeemKhan Tuesday, February 9, 2010 3:14 PM
Tuesday, February 9, 2010 2:49 PM -
thanksWednesday, February 10, 2010 12:20 PM