From: Curious on
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?
From: Family Tree Mike on
On 5/4/2010 9:09 PM, Curious wrote:
> 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.

--
Mike
From: Curious on
On May 4, 9:27 pm, Family Tree Mike <FamilyTreeM...(a)ThisOldHouse.com>
wrote:
> On 5/4/2010 9:09 PM, Curious wrote:
>
> > 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.
>
> --
> Mike

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?
From: Family Tree Mike on
On 5/4/2010 9:50 PM, Curious wrote:
> On May 4, 9:27 pm, Family Tree Mike<FamilyTreeM...(a)ThisOldHouse.com>
> wrote:
>> On 5/4/2010 9:09 PM, Curious wrote:
>>
>>> 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.
>>
>> --
>> 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".

--
Mike