views:

290

answers:

3

Where can I find a Visual Studio plug-in that automatically generates documentation header for methods and properties?

Example the comment to a property could look like this:

/// <summary>
/// Gets or sets the value of message
/// </summary>
public static string Message        
{
   get
   {
       return message;
   }

   set
   {
       message = value;
   }
}
+7  A: 

Ghostdoc from http://www.roland-weigelt.de/ghostdoc/

Joe
Thank you, the tool is EXACTLY what I needed and it is a very good tool indeed.
Germstorm
+4  A: 

GhostDoc is the usual suspect.

As another poster mentioned, Visual Studio also does this to an extent by entering 3 '///' (forward slashes) on the line preceding a property/method/class definition.

Thank you too :)
Germstorm
+2  A: 

Visual Studio does this automatically. Just position the cursor directly above the method and enter three '/'s for example:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace MvcWidgets.Models
{
    /// <summary>
    /// This is a summary comment
    /// </summary>
    public class Comment
    {
        /// <summary>
        /// 
        /// </summary>
        /// <param name="name"></param>
        /// <param name="birthdate"></param>
        /// <param name="website"></param>
        /// <returns></returns>
        public int SomeMethod(string name, DateTime birthdate, Uri website)
        {
            return 0;
        }
    }
}

You can then generate an XML comment file and then generate a Help file using SandCastle.

You may have to enable this feature in the Text Editor/C#/Advanced options dialog.

Matthew
That's true, but GhostDoc can do some additional things.
M4N
I know about the /// thing, what I need is the filling (= what Ghost Doc does)
Germstorm