remi bourgarel
remi bourgarel

Reputation: 9389

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?

Upvotes: 30

Views: 5129

Answers (3)

A. Milto
A. Milto

Reputation: 2383

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

From the release notes: "Returns" tag contents

Upvotes: 6

Hermann.Gruber
Hermann.Gruber

Reputation: 1484

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).

Upvotes: 3

Shahar G.
Shahar G.

Reputation: 1510

Sometimes it takes time for the IntelliSense to comprehend your code. To verify that the tag is there, try using the /doc compiler option like this:

csc YourClass.cs /doc:YourClass.xml

If the tag is present, then it's just a matter of IntelliSense issue which is usually fixed by its own or by restarting VS

Upvotes: -2

Related Questions