P
Pete Davis
I came across the following code in the .NET Framework:
((IBindingList) list).ListChanged -= new
ListChangedEventHandler(this.List_ListChanged);
In other places, they hold onto a reference to the original event handler
instance and unsubscribe that. I've always held the references and
unsubscribed the original myself.
Unsubscribing from a new instance instead of the original instance just
seems wrong. Yet one of my co-workers claims this actually works. Does it?
Pete
((IBindingList) list).ListChanged -= new
ListChangedEventHandler(this.List_ListChanged);
In other places, they hold onto a reference to the original event handler
instance and unsubscribe that. I've always held the references and
unsubscribed the original myself.
Unsubscribing from a new instance instead of the original instance just
seems wrong. Yet one of my co-workers claims this actually works. Does it?
Pete