Solved

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

Posted on 2011-02-24
5
411 Views
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> [...]

0
Comment
Question by:hpdvs2
  • 3
5 Comments
 
LVL 3

Expert Comment

by:kraiven
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.

See http://msdn.microsoft.com/en-us/library/ms165394%28VS.80%29.aspx
0
 
LVL 8

Author Comment

by:hpdvs2
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.

Thanks.
0
 
LVL 11

Accepted Solution

by:
Sudhakar Pulivarthi earned 500 total points
ID: 34978510
Hi,
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.
http://submain.com/download/ghostdoc/
0
 
LVL 8

Author Comment

by:hpdvs2
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...";
0
 
LVL 8

Author Closing Comment

by:hpdvs2
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...";
0

Featured Post

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

773 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