S
Smithers
Just looking to compile a list of "all the ways to implement events".
I'm NOT looking to get into the merits or mechanics of each in this
thread... just want to identify them all - good, bad, and ugly.
Here's what I have so far
1. Implement via the 'event' keyword (with associated delegate, etc)
2. Expose a private delegate via a public property (really a "roll yer own"
version of the 'event' keyword method).
3. Old-school callbacks in which one object (objA) calls another (objB),
passing a reference of itself to the called object (objB then contains a
reference to objA). The called object can then call methods on the calling
object (i.e., objB calls methods of objA).
4 ... ???
I'd appreciate any additional ways to implement "events" - including total
hacks.
I'm looking to grasp finally grasp the entire landscape of events and
callback mechanisms that are available in .NET (even if they are independent
of .NET, like plain ole' callbacks).
Thanks.
I'm NOT looking to get into the merits or mechanics of each in this
thread... just want to identify them all - good, bad, and ugly.
Here's what I have so far
1. Implement via the 'event' keyword (with associated delegate, etc)
2. Expose a private delegate via a public property (really a "roll yer own"
version of the 'event' keyword method).
3. Old-school callbacks in which one object (objA) calls another (objB),
passing a reference of itself to the called object (objB then contains a
reference to objA). The called object can then call methods on the calling
object (i.e., objB calls methods of objA).
4 ... ???
I'd appreciate any additional ways to implement "events" - including total
hacks.
I'm looking to grasp finally grasp the entire landscape of events and
callback mechanisms that are available in .NET (even if they are independent
of .NET, like plain ole' callbacks).
Thanks.