Visual Studio/VB.NET: How To Easily Document Your Code
If you’re a routine Visual Studio user like me, I don’t need to tell you how awesome Intellisense is. Not only would some of us be lost without it, but it also helps us be way more efficient programmers either through simple selection of methods or properties or by discovering new object members that maybe we didn’t know about previously. Additionally, one of the main benefits of Intellisense is that it tells you about the item in question, for instance, that the String.IsNullOrEmpty() function “Indicates whether the specified System.String object is null or an System.String.Empty string.”

When writing my own objects, however, I used to find myself yearning for this kind of help for my own functions. Wouldn’t it be great to get Intellisense to tell me what that “GetUserInfo” function I wrote five weeks ago does rather than me having to go look it up? What about what those parameter names mean? Luckily, there is a way, and it is super easy.
For example, let’s say you have an object that returns its own permalink in a shared function called GetHTMLPermaLink(). To document it, simply place your cursor above the function and press the apostrophe key three times: '''. Automagically, the following pops up:

All you have to do is fill in the blanks and viola, you have documented code! (NOTE: in C#, I believe the syntax is /// but I’m not sure.) To see this in action, after you fill in the appropriate information, go try to pull up your function somewhere and watch the magic:

More information on Visual Studio Code Documentation (C#)
Happy documenting!
RSS Feed
hi
I’m using vb.net 2008 , and when typing ”’ there is no reaction act . when i using /// is c# , it works ; but i don’t know why it doesn’t work is vb . is it have a configuration to be active ?
Amir –
I don’t think any configuration is necessary. Are you sure you’re putting your cursor in the right spot? It should go on the line immediately above whatever you wish to describe.
Good luck!
I found the solution for Amir’s problem. I had the same…
In project properties the “Generate XML documentation file” has to be checked in the Compile tab. It’s almost at the bottom of that tab.
I have the “Generale XML documentation file” option checked, yet typing ”’ doesn’t do anything. Not sure why this is.
OK apparently you can only generate XML comments when typing ”’ above a function and indeed, when “Generate XML documentation file” is unchecked it stops working.
Cheers