如何在 Visual Studio 中获取参数提示/完成? [英] How to get parameter hints/completion in Visual Studio?
问题描述
我通常使用 Eclipse 进行编码,它有一个相当不错的参数补全功能:当你调用一个方法时,只要你输入 (,它就会显示参数列表,并突出显示键入时的位置:
如何在 Visual Studio 2012 中获得类似的帮助?
我知道 Ctrl + K, Ctrl + I 会显示有关光标当前突出显示的一些信息,但如果您已经开始输入内容,则它不起作用.如果我输入 MyMethod(arg1,
然后点击快捷方式(或任何其他,例如 Ctrl + Space 或 Ctrl + Shift + Space),我没有得到任何有用的东西.
您可以使用:
Ctrl+Shift+空格.这将显示光标当前所在方法的参数列表.
示例:
在光标位于 "a",
之后按下 Ctrl+Shift+Space 结果:>
您可以检查它是否在键盘设置中正确分配,如Edit.ParameterInfo
:
I usually use Eclipse for coding, which has a pretty nice parameters completion feature: when you are calling a method, just after you typed (, it will show you the list of parameters, and highlight where you are as you type:
How can I get similar help in Visual Studio 2012?
I know that Ctrl + K, Ctrl + I shows some info about what your cursor currently highlights, but it doesn't work if you already have started typing something. If I type MyMethod(arg1,
and then hit the shortcut (or any other, such as Ctrl + Space or Ctrl + Shift + Space), I don't get anything useful.
You can use:
Ctrl+Shift+Space. This brings up the argument list for a method your cursor is currently in.
Example:
Pressing Ctrl+Shift+Space with the cursor after "a",
results in:
You can check this is properly assigned in the keyboard settings, as Edit.ParameterInfo
:
这篇关于如何在 Visual Studio 中获取参数提示/完成?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!