views:

123

answers:

3

I'm wondering if there is any shortcut in visual studio to generate automatic documentation for a method or class.

For example when I write a method:

public void MyFunction(int d)
{

}

I want generate the following structure:

    /// <summary>
    /// 
    /// </summary>
    /// <param name="d"></param>
+9  A: 

This is what happens when you type /// above the method signature.

You can also install and use a documentation tool like GhostDoc that also adds some detail to the code documentation that it generates.

Oded
so obvious that I couldn't find the answer anywhere :)
mack369
Great. Thanks for this. I used only "///" and had no idea about GhostDoc
Adrian Faciu
+1 for GhostDoc. That's a really cool thing.
Oliver
unfortunately Visual Studio Express Edition doesn't support ad-ins so I cannot use GhostDoc
mack369
+2  A: 

I use GhostDoc for this. Means you can right-click on a method and it will insert the comments. The main benefit is that it inserts some default comment text as well, which is very useful.

Fiona Holder
A: 

Take a look at my addin, AtomineerUtils. It's similar to GhostDoc, but is considerably more powerful and flexible.

Jason Williams