J
jm
If I have multiple subscribers to a delegate, what keeps track of them?
Are they out there on the heap?
When I declare a delegate:
public delegate void MyDelegate (object myObject, MyObjectEventArgs
myEvent);
public MyDelegate SomethingHappened;
and later I have two subscribers, what's going on in the background.
My Delegate "variable," if that is what it's called just looks like a
variable, but behind the scenes it can hold multiple instances of
subscribers, correct, like an array? Just wondered what was going on.
I'm "protected" from it by the .Net framework.
Thanks.
Are they out there on the heap?
When I declare a delegate:
public delegate void MyDelegate (object myObject, MyObjectEventArgs
myEvent);
public MyDelegate SomethingHappened;
and later I have two subscribers, what's going on in the background.
My Delegate "variable," if that is what it's called just looks like a
variable, but behind the scenes it can hold multiple instances of
subscribers, correct, like an array? Just wondered what was going on.
I'm "protected" from it by the .Net framework.
Thanks.