Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Show <returns> xml tag into visual studio intellisense

I added the <returns> xml tag to some of my methods but I can't see its content in IntelliSense.

Here is my code:

/// <summary> /// we all live in a yellow summary /// </summary> /// <returns>what it returns</returns> public int MyMethod() { .... } 

Is there any way to show this content?

like image 697
remi bourgarel Avatar asked Mar 17 '10 16:03

remi bourgarel


People also ask

How to on IntelliSense in Visual Studio?

To access this options page, choose Tools > Options, and then choose Text Editor > C# > IntelliSense.

How to generate XML documentation Visual Studio?

From the menu bar, choose Tools > Options to open the Options dialog box. Then, navigate to Text Editor > C# (or Visual Basic) > Advanced. In the Editor Help section, look for the Generate XML documentation comments option.

What is XML comment in C#?

C# documentation comments use XML elements to define the structure of the output documentation. One consequence of this feature is that you can add any valid XML in your documentation comments. The C# compiler copies these elements into the output XML file.

What sequence of characters indicates the start of an XML style documentation comment in C# code?

The use of XML doc comments requires delimiters that indicate where a documentation comment begins and ends. You use the following delimiters with the XML documentation tags: /// Single-line delimiter: The documentation examples and C# project templates use this form.


2 Answers

This has been finally implemented in Visual Studio 2019 v.16.6.0, only a decade later :)

From the release notes: "Returns" tag contents

like image 139
A. Milto Avatar answered Oct 04 '22 03:10

A. Milto


This currently does not work (Visual Studio 2017), and is an open issue:

https://github.com/dotnet/roslyn/issues/31618

One way to make it work is to install the ReSharper Visual Studio plugin (but this is paid-for).

like image 31
Hermann.Gruber Avatar answered Oct 04 '22 04:10

Hermann.Gruber