开发者

How to display the comment text which you set in the xml comment? [duplicate]

开发者 https://www.devze.com 2023-03-15 10:25 出处:网络
This question already has answers here: Show <returns> xml tag into vi开发者_开发技巧sual studio intellisense
This question already has answers here: Show <returns> xml tag into vi开发者_开发技巧sual studio intellisense (3 answers) Closed 5 years ago.

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号