How to show method parameter tooltip in C#?

大城市里の小女人 提交于 2019-12-03 00:25:35

问题


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.


回答1:


Ctrl+Shift+Space will do what you want.

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




回答2:


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




回答3:


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
}



回答4:


Ctrl + K, Ctrl + P

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



来源:https://stackoverflow.com/questions/4849672/how-to-show-method-parameter-tooltip-in-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!