.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
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 to share