G
Guest
Hello,
I recently started using delegates in my VB apps to handle asynchronous
operations. Based on the examples that I followed, delegates appear to work
in a similar way as Interfaces. Interfaces define methods and functions
that a class which implements the interface must also contain - so I get the
impression that an Interface is like a skeleton of the methods... And a
delegate defines the arguments for a function which have to be followed/used
by the functions/methods which are called by events assigned to the delegate.
So my simplistic question is if I can think of a delegate as a sort of
interface for functions and methods in a class where the delegate is assigned
to events in the class that call these functions/methods?
Thanks,
Rich
I recently started using delegates in my VB apps to handle asynchronous
operations. Based on the examples that I followed, delegates appear to work
in a similar way as Interfaces. Interfaces define methods and functions
that a class which implements the interface must also contain - so I get the
impression that an Interface is like a skeleton of the methods... And a
delegate defines the arguments for a function which have to be followed/used
by the functions/methods which are called by events assigned to the delegate.
So my simplistic question is if I can think of a delegate as a sort of
interface for functions and methods in a class where the delegate is assigned
to events in the class that call these functions/methods?
Thanks,
Rich