.Net comments auto-add

Where can I find a Visual Studio plugin that automatically generates the documentation title for methods and properties?

An example of a property comment might look like this:

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

   set
   {
       message = value;
   }
}

      

+1


source to share


3 answers


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



+8


source


GhostDoc is a common suspect.



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

+4


source


Visual Studio does this automatically. Just place your 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;
        }
    }
}

      

Then you can create an XML comment file and then generate a help file using SandCastle.

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

+3


source







All Articles