如何在Visual Studio中自动完成委托 [英] How to autocomplete a delegate in Visual Studio

查看:288
本文介绍了如何在Visual Studio中自动完成委托的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何根据代理自动完成方法签名?或者至少在完成方法签名时从智能感知获得一些帮助。

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

某些方法有一个委托作为其参数之一,所以我必须创建这个方法,叫我懒惰,但是很难从MSDN复制粘贴方法签名。

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.

我记得当你指定一个事件处理程序时,Visual Studio有一个自动完成功能(通过点击选项卡),但我不知道这是否可能为其他类型代理人。

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.

推荐答案

除非您订阅了活动,否则您无法执行此操作。

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.

这篇关于如何在Visual Studio中自动完成委托的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆