visual-studio 跳转到 Visual Studio 中函数/类的文档
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2854672/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Jump to Documentation for a function/class in Visual Studio
提问by Casebash
In Eclipse and Xcode it is possible to jump directly to the documentation for a function/class from the editor. Does Visual Studio provide this functionality?
在 Eclipse 和 Xcode 中,可以从编辑器直接跳转到函数/类的文档。Visual Studio 是否提供此功能?
采纳答案by Mike
Try F1or Ctrl+ F1.
尝试F1或Ctrl+ F1。
Visual Studio Default Settings Shortcut Keys (via the Internet Archive Wayback Machine)
Visual Studio 默认设置快捷键(通过 Internet Archive Wayback Machine)
Integrated Help shortcut keys (via the Internet Archive Wayback Machine)
集成帮助快捷键(通过 Internet Archive Wayback Machine)
Default keyboard shortcuts in Visual Studio
Default keyboard shortcuts in Visual Studio - Help section
Visual Studio 中的默认键盘快捷键 - 帮助部分
Btw. with F12you can go to the declaration of selected item in code.
顺便提一句。用F12你可以去选择的项目的代码的声明。
回答by EdgarVerona
Ah, try hitting F1 when your cursor is over a function or class. That should initiate a search in the MSDN documentation. Give that a shot!
啊,当您的光标位于函数或类上时,尝试按 F1。这应该会在 MSDN 文档中启动搜索。试一试!
回答by Kangkan
I am not aware of Eclipse. But in visual studio, you can do the documentation within the studio. You can document the class or a method by putting the details in the comment section (with each line starting with a '///') like the following:
我不知道 Eclipse。但是在visual studio中,你可以在studio内做文档。您可以通过将详细信息放在注释部分(每行以“///”开头)来记录类或方法,如下所示:
/// <summary>
/// Adds one item at a time to the cart
/// </summary>
/// <param name="itemToBuy">Selected item from the catalog</param>
/// <param name="qnty">Quantity bought</param>
public void AddItem(item itemToBuy, int qnty, double price, bool isImported)
This is for doing documentation for your own code.
这是为您自己的代码做文档。
To get help, or see documentation, pressing F1 or Ctrl+F1 while keeping the cursor on top of the item takes you to the MSDN.
要获得帮助或查看文档,请在将光标保持在项目顶部的同时按 F1 或 Ctrl+F1 将您带到 MSDN。

