开发者

Events subscribing equivalent of "+= Tab Tab" in C# VS IDE

I wonder what is (if is) the "shortcut"(code-snippet) for adding handlers in VB.NET (Visual Studio 2005/08), equivalent to the += 开发者_C百科+ Tab + Tab in button1.Click += ... C# IDE.

In this way C# IDE auto-creates the necessary method, with all necessary parameters. So, If I know that I need to execute a method at a event even if I don't know the function implementation signature I do MyEvent+=TabTab and I just write the method's code.

So AddHandler button1.Click???

Nota Bene

I am asking about a object not (necessarily) linked with the Visual Studio Form's designer. Suppose my button is a private one in a custom class or is a button generated by some code, or, in general my button is a any object that implement an event...

Thanks.


AddHandler button1.Click, AddressOf MethodName

Unless you're taking about auto-creating the method which C# does, then I have no idea :/

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜