Show <returns> xml tag into visual studio intellisense

梦想的初衷 提交于 2019-12-03 20:35:54

问题


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?


回答1:


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




回答2:


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



来源:https://stackoverflow.com/questions/2464086/show-returns-xml-tag-into-visual-studio-intellisense

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!