How to see full document generated by xml-comments

拥有回忆 提交于 2020-03-22 07:28:14

问题


I have writen a method such as:

/// <summary>
/// A method having xml-comments
/// This comment could be very long
/// </summary>
/// <param name="input">Input parameter</param>
/// <returns>Calculated value</returns>
int CommmentedMethod(int input) {
    return Calc(input);
}

But when I use this method, Visual Studio (I'm using VS 2010) just show up "A method having xml-comments This comment could be..." not a full document.

Is there an option to show it?

Updated picture:

Thanks :-)


回答1:


You can use Ctrl + Shift + Space key combination to view the parameter information.

In the following screenshot you can see the overloads, definition and parameter information being shown after clicing Ctrl + Shift + Space with the caret on Format method.




回答2:


This works in VS2010 as suggested by an answer above. It works in VS2010 showing the entire string fully in tooltip. I suggest you retry in a fresh project again and rebuild the project and see. Intellisense normally uses the text for tooltip that it has used recently. So if you have not completed it on the first time and built it, its not going to show fully. Rebuiding the project should work though. Having said this, I just tried your code and it worked like a dream. So, Please try in a fresh project and see.

Use Quick Info (the tooltip that's shown when you hover your mouse over a method). This will display more than one parameter per line and therefore be able to display more parameters without truncating.

Set a smaller font or font size for tooltips. This can be changed by going to Tools->Options->Environment->Fonts and Colors, choosing "Editor Tooltip" in the dropdown at the top, and setting a different font and/or size.

P.S: However there is one problem if you have done so. Did you migrate from other version of Visual Studio and transfer settings. Because Visual studio has capabilities to import and export settings which you can include intellisense settings also. It may be something I'm not aware of, if you have done so.

Please install SP1 for VS2010 because that's what is solving the problem of truncating quickinfo else reduce font size as I have mentioned ! Hope this helps ! This works by all means and verified !!




回答3:


If you use ReSharper you can press CTRL+SHIFT+F1. I don't think Microsoft has this feature.




回答4:


The tooltip for VS2010 will show the entire contents. I just tested with a new install of VS2010 with no installed addins (Windows 7 pro).

You might try clearing the Automatically adjust visual experience based on client performance flag in the Options... dialog General section and then checking Enable rich client visual experience. The documentation on exactly what this provides is vague, but I suspect this could affect the tooltip display.



来源:https://stackoverflow.com/questions/7035404/how-to-see-full-document-generated-by-xml-comments

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