How to autocomplete a delegate in Visual Studio

只谈情不闲聊 提交于 2019-12-08 03:41:49

问题


How do you autocomplete a method signature based on a delegate? Or atleast get some help from intellisense in completing the method signature.

Some method has a delegate as one of its parameters, so I have to create the method, call me lazy but it's quite painful to copy paste the method signature from MSDN.

I recall that when you specify an event handler, Visual Studio has an autocomplete feature for you (by hitting tab), but I wonder if this is possible for other kind of delegates.


回答1:


You can't do this unless your are subscribing to an event. It can be a custom event of course.

But for other delegates not possible.




回答2:


It is possible - just type the name of the new method where the delegate parameter is expected, press Ctrl+. (quick actions) and choose "Generate method...".



来源:https://stackoverflow.com/questions/4067878/how-to-autocomplete-a-delegate-in-visual-studio

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