Reputation: 1431
I have regions and various methods within those regions. When I add XML comments to the top of the methods and collapse the xml comment it shows something like "/// ..." which is ueseless. How can I make it show the content inside the summary tag when collapsed.
VS 2008 Pro .NET 3.5 SP1
Thanks!
Matt
Upvotes: 5
Views: 653
Reputation: 7493
The collapsed comment block will display the first line of the comment until you expand it. Therefore, you could format your XML comments to include a representative portion of the summary on the first line:
/// <summary>The most important part of your comment on the first line
/// and other stuff following on subsequent lines.</summary>
public static void DoStuff()
{
// ...
}
Will collapse to:
/// <summary>The most important part of your comment on the first line ...
public static void DoStuff() ...
Upvotes: 0
Reputation: 25692
If you write the summary out all in one line, such as:
/// <summary>My summary.</summary>
... you will see the summary when collapsed.
Frankly, I don't like this approach, because my summaries are usually longer than fits comfortably on one line.
Upvotes: 2