XML Comments in C# don't show summary they show xml
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 c开发者_StackOverflow中文版ollapsed.
VS 2008 Pro .NET 3.5 SP1
Thanks!
Matt
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.
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() ...
精彩评论