How to display the comment text which you set in the xml comment? [duplicate]
When I create a method I use XML comment:
/// <summary>
/// Here goes the summary
/// </summary>
/// <param name="contextId">Some text about the parameter</param>
/// <returns>Some text which describes the return value</returns>
But when I want to use a method with this kind of commenting, I don't see the 'return' text. Is it possible to see this text in Visual Studio while you are using the method?
I am using VS 2010
Same question as Show <returns> xml tag into visual studio intellisense
Simple answer is no, you cannot see the <returns>
tag content in the tooltip while using the method in question. The <returns>
tag will instead be shown in the documentation file. A walkthrough of how to create that file is at http://www.codeproject.com/KB/XML/csharpcodedocumentation.aspx
When writing your own code, your method summary should give a good understanding of what is being returned in the context of knowing the return type, e.g. the summary for MSFT's System.Int32.Equals(System.Int32 obj)
(which has a boolean return type) is Returns a value indicating whether this instance is equal to a specified System.Int32 value.
精彩评论