Single-thread delegate vs multi-thread delegate

C

Curious

I was asked this during an interview. I had not heard about Single-
thread delegate or multi-thread delegate.

I did a search on google and have not found any reference about
either. Anyone can tell me what they are?
 
F

Family Tree Mike

I was asked this during an interview. I had not heard about Single-
thread delegate or multi-thread delegate.

I did a search on google and have not found any reference about
either. Anyone can tell me what they are?

Could the question have been regarding Multicast vs. Singlecast
delegates? An example of multicast delegates would be that the events
raised by an object may be subscribed to by multiple objects.
 
C

Curious

Could the question have been regarding Multicast vs. Singlecast
delegates?  An example of multicast delegates would be that the events
raised by an object may be subscribed to by multiple objects.

You could be right there. What do you mean by "events raised by an
object"? Can you give an example?

I also am not clear about the relation between events and delegates.
Can you show an intuitive example?
 
F

Family Tree Mike

You could be right there. What do you mean by "events raised by an
object"? Can you give an example?

Well, a form closing raises events. In an MDI application, the main
application form and a child which opens a details form may subscribe to
the form closing event of the lowest level form. The lowest level form
just broadcasts the event (via a delegate), hence the term multicast
delegate.
I also am not clear about the relation between events and delegates.
Can you show an intuitive example?

Perhaps http://msdn.microsoft.com/en-us/library/17sde2xt(VS.71).aspx and
then follow the link for "Raising an Event".
 

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