/// <summary></summary> by default please

Posted on 2011-02-24
Last Modified: 2012-06-27
I'm using VS 2010, and the default for adding the XML comments are like this:
/// <summary>
/// </summary>

I would like them to default to this:
/// <summary></summary>

manually setting this is not the end of the world, but it does get tedious.

Reason for this preference:
 - When you minimize the XML Comments, it reduces to this:
/// <summary> [...]
 - If it is on one line, you get it to minimize to this:
/// <summary>Used to process data :(</summary> [...]

Question by:hpdvs2
  • 3

Expert Comment

ID: 34971990
If you're happy to lose all of the automatically produced parameter and return values that the expanded comment gives you then I would suggest writing your own code snippet. It's really easy and would give you exactly the functionality you want.


Author Comment

ID: 34972154
While that does provide a partial solution, the key purpose of this is to reduce some of the overhead while still allowing the minimized XML comment to be easily read.

In my opinion, having to rewrite the additional comments portions would require more work than altering the initial line.

LVL 11

Accepted Solution

Sudhakar Pulivarthi earned 500 total points
ID: 34978510
It is good to use GhostDoc Plugin for VS 2010/2005 which writes the standard comments automatically. quite interesting one!!!
U can download it from below link.

Author Comment

ID: 34980375
Sudhakar, your answer worked.  I was able to use to free edition to do this.  One additional note, by default, Ghost doc is not setup like this.  I had to go in to the Tools=>Ghost Doc=>Options, then from the Ghost doc config window, select the "Options" tab, and check "Keep single line...";

Author Closing Comment

ID: 34980389
Just adding this line, to get this behavior out of the program, you need to go in to the menu Tools=>Ghost Doc=>Options, then from the Ghost doc config window, select the "Options" tab, and check "Keep single line...";

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Although it is an old technology, serial ports are still being used by many hardware manufacturers. If you develop applications in C#, Microsoft .NET framework has SerialPort class to communicate with the serial ports.  I needed to…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…
In an interesting question ( here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

860 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question