How to show method parameter tooltip in C#?

后端 未结 5 552
爱一瞬间的悲伤
爱一瞬间的悲伤 2021-01-29 20:11

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 param

相关标签:
5条回答
  • 2021-01-29 20:49

    Ctrl+Shift+Space will do what you want.

    You might want to check out a poster of key bindings.

    0 讨论(0)
  • 2021-01-29 20:55

    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
    }
    
    0 讨论(0)
  • 2021-01-29 20:57
    Ctrl + K, Ctrl + P
    

    Worked for me where Ctrl + Shift + Space didn't. Perhaps due to Resharper?

    0 讨论(0)
  • 2021-01-29 21:01

    It's Ctrl-K Ctrl-I for VS2015. In case people from the future are wondering wandering.

    0 讨论(0)
  • 2021-01-29 21:14

    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
    
    0 讨论(0)
提交回复
热议问题