Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get parameter hints/completion in Visual Studio?

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:

Example of parameters completion in Eclipse

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.

like image 886
Wookai Avatar asked Jul 10 '13 22:07

Wookai


People also ask

How do I get hints for Visual Studio code?

You can trigger IntelliSense in any editor window by typing Ctrl+Space or by typing a trigger character (such as the dot character (.)

How do I turn on hints in Visual Studio 2019?

In order to access this feature, you will need to turn this option on in Tools > Options > Text Editor > C# or Basic > Advanced and select Display inline parameter name hints (experimental). The inline parameter name hints will then appear in C# or Visual Basic file.

How do I enable IntelliSense in Visual Studio?

To access this options page, choose Tools > Options, and then choose Text Editor > C# > IntelliSense.


2 Answers

You can use:

Ctrl+Shift+Space. This brings up the argument list for a method your cursor is currently in.

Example:

typing

Pressing Ctrl+Shift+Space with the cursor after "a", results in:

ctrlshiftspace

You can check this is properly assigned in the keyboard settings, as Edit.ParameterInfo:

assigned

like image 160
Simon Whitehead Avatar answered Oct 08 '22 17:10

Simon Whitehead


For my case, neither Ctrl+Shift+Space nor Ctrl+K+P work.. eventually I nailed it down to this settings:

Visual Studio Text Editor Intellisense

Now whenever I typed (, intellisense will automatically pop up!.. nice!

As it turned out, this is caused by Resharper..., the Resharper uninstall doesn't correctly restore the original Visual Studio settings.

like image 33
Rosdi Kasim Avatar answered Oct 08 '22 15:10

Rosdi Kasim