[Ironruby-core] Delegates (agian)
Eric Nicholson
enicholson at gmail.com
Fri Oct 26 13:32:14 EDT 2007
I don't know if it's relevant or not, but the VB Windows Forms designer
doesn't generate anything like this anyway. It looks like:
Private Sub x_myevent() Handles x.myevent
End Sub
The compiler wires up the delegates.
On 10/26/07, Joe Chung <lists at ruby-forum.com> wrote:
>
> Dermot Hogan wrote:
> > So in C#, we have x += new EventHandler(mymethod)
> >
> > and in VB (I'm a bit rusty but something like this):
> >
> > x += new EventHandler(AddressOf mymethod)
> >
> The syntax for VB event handlers is
>
> AddHandler x.myevent, AddressOf mymethod
>
> assuming that the event being handled here is myevent.
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Ironruby-core mailing list
> Ironruby-core at rubyforge.org
> http://rubyforge.org/mailman/listinfo/ironruby-core
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://rubyforge.org/pipermail/ironruby-core/attachments/20071026/58a3eac6/attachment.html
More information about the Ironruby-core
mailing list