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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-22 11:59:50  来源:igfitidea点击:

Jump to Documentation for a function/class in Visual Studio

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 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。