Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to make Visual Studio intellisense to show the remarks portion of XML comments?

When typing code, I really like the intellisense feature of Visual Studio 2010 (Professional), especially that I am able to look up XML comments of types in use. (See Documentation from Microsoft). This works so far. However, the remarks section of XML code comments does not show up.

I would consider this an extremely useful feature, since there is often useful information that can not get easily guessed from the summary. (Which is why we have a the remarks section, i guess)

How to explore the remarks portion in Visual Studio 2010 (Professional) at the intellisense level? (I use DevXpress Coderush, if that matters, but I don't think so).

like image 275
Marcel Avatar asked Dec 27 '11 14:12

Marcel


People also ask

What symbols are needed for an XML comment in Visual Studio?

The syntax for adding XML comments in your code is triple slashes /// followed by one of the supported XML tags.

How do you add comments in XML?

An XML comment encountered outside the document type declaration is represented by the Comment value syntax element. It contains the comment text from the XML message. If the value of the element contains the character sequence --> , the sequence is replaced with the text --> .


Video Answer


2 Answers

Visual Studio v16.6.5 has an option in "Text Editor > C# > Advanced > Editor Help", called "Show remarks in Quick Info". It was added very recently and was enabled by default, but I haven't found any release notes or documentation about it. I checked version 16.5.2 and it does not have such an option.

When enabled, Quick Info shows the remarks section after adding a paragraph separator (empty line). When there is no summary section, the paragraph separator still gets added before the remarks (not sure if that's intentional).

The returns section is now also similarly shown, after the remarks section, separated by the word "returns". But there does not appear to be an option to disable this one.

like image 102
Andrius R. Avatar answered Nov 04 '22 06:11

Andrius R.


Put your cursor over the class/function/whatever that you want to see the full comments on, then press F12. Expand the comments section on the left of the editor pane.

like image 20
DFTR Avatar answered Nov 04 '22 08:11

DFTR