A
Arthur Dent
Anyone know, in VB.NET (2005) how to prevent duplicate occurrences of the
same event handler on an event?
e.g... I have some object which raises an event, and some other class which
consumes them. So in essence what I want to do is something like this in the
consumer class...
If Not objEventSource.SomeEvent.Handlers.Contains(AddressOf me.EventHandler)
Then _
AddHandler objEventSource.SomeEvent, AddressOf me.EventHandler
same event handler on an event?
e.g... I have some object which raises an event, and some other class which
consumes them. So in essence what I want to do is something like this in the
consumer class...
If Not objEventSource.SomeEvent.Handlers.Contains(AddressOf me.EventHandler)
Then _
AddHandler objEventSource.SomeEvent, AddressOf me.EventHandler