简体   繁体   English

如何让 Visual Studio 智能感知显示 XML 注释的注释部分?

[英]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.在键入代码时,我非常喜欢 Visual Studio 2010(专业版)的智能感知功能,尤其是我能够查找正在使用的类型的 XML 注释。 (See Documentation from Microsoft ). (请参阅Microsoft 的文档)。 This works so far.到目前为止,这有效。 However, the remarks section of XML code comments does not show up.但是,XML 代码注释的注释部分没有显示。

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?如何在智能感知级别探索 Visual Studio 2010(专业版)中的备注部分? (I use DevXpress Coderush , if that matters, but I don't think so). (我使用DevXpress Coderush ,如果这很重要,但我不这么认为)。

Visual Studio v16.6.5 has an option in "Text Editor > C# > Advanced > Editor Help", called "Show remarks in Quick Info". Visual Studio v16.6.5 在“文本编辑器 > C# > 高级 > 编辑器帮助”中有一个选项,称为“在快速信息中显示备注”。 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.我检查了 16.5.2 版,它没有这样的选项。

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.但是似乎没有禁用此选项的选项。

Put your cursor over the class/function/whatever that you want to see the full comments on, then press F12.将光标放在类/函数/任何您想查看完整注释的内容上,然后按 F12。 Expand the comments section on the left of the editor pane.展开编辑器窗格左侧的评论部分。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM