Reputation: 5519
VS2010:
In VB I can place the cursor inside an existing method's parameter brackets and type a 'space', which will bring up the tooltip with description of the parameter I'm at. This is not the case in C#. I have to delete the whole brackets including the parameters, and retype the left bracket, for this tooltip to show. Is there some shortcut or setting to change this behavior? I tried hitting ctrl, shift, alt, but it has no effect.
Upvotes: 179
Views: 96754
Reputation: 6508
Finally now an inbuild feature in Visual Studio 2022.
you will need to turn this option on in Tools
> Options
> Text Editor
> C#
> Advanced
and search Inline Hints
and check Display inline parameter name hints
as shown below.
You'll then have a display like following
Upvotes: 0
Reputation: 3529
The most reliable way to know it (due to plugins etc) is to look it up in settings.
Tools
-> Options
Environment
-> Keyboard
Show commands containing:
field (e.g. type in "param" there)Also here is a list of all shortcuts in MS docs, which has command names along with description. I find it easier to search commands there rather then inside in-app settings.
Upvotes: 2
Reputation: 11598
Visual Studio 2019 with VsVim extension
Works both in NORMAL
and INSERT
modes, for C# and C++ with:
Ctrl+Shift+Space
Just make sure to place the caret right after the first parenthesis:
C#
"Value".Contains(| <-- caret
C++
glClearColor(| <-- caret
Upvotes: 10
Reputation: 71
Ctrl + K, Ctrl + P
Worked for me where Ctrl + Shift + Space
didn't. Perhaps due to Resharper?
Upvotes: 7
Reputation: 4187
It's Ctrl-K Ctrl-I for VS2015. In case people from the future are wondering wandering.
Upvotes: 42
Reputation: 4284
I don't understand what you mean exactly. But I use this coding for method parameters tooltip.
/// <summary>
/// Do work function
/// </summary>
/// <param name="id">This is user's Id.</param>
/// <param name="name">This is user's Name.</param>
/// <param name="surname">This is user's surname. </param>
private void DoWork(int id, string name, string surname)
{
// do stuff
}
Upvotes: 19
Reputation: 29668
Ctrl+Shift+Space will do what you want.
You might want to check out a poster of key bindings.
Upvotes: 344