Custom Events versus Multicast Delegates for events(VB.NET)

G

Guest

What are the different features (in VB.NET) between a) Custom Events and b)
Multicast Delegates to raise events?

On the bottom line my class ad a) manages a list of handlers or ad b)
obtains a list of handlers (using GetInvocationList) and invokes them
one-by-one. So where is the difference?

eg are Custom Events the only way to raise an event asynchronously?

thanks herbert
 
M

Mattias Sjögren

What are the different features (in VB.NET) between a) Custom Events and b)
Multicast Delegates to raise events?

Well the event is backed by a (multicast) delegate, so the only real
difference is that you restrict access to it by using an event.
(Similar to the difference between a property and a public field).


Mattias
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top