Been doing this for a while but haven't noticed I have been using a "new" each time I remove an event handler. Am I supposed to be creating a new object?
Basically is there a difference between 1 and 2?
(1)ethernetdevice.PcapOnPacketArrival -= new SharpPcap.PacketArrivalEvent(ArrivalResponseHandler);
(2)ethernetdevice.PcapOnPacketArrival -= ArrivalResponseHandler;
EDIT: Okay this is a repeat. Sorry about that. Answer posted here: http://stackoverflow.com/questions/1307607/removing-event-handlers
Two delegates of the same type with the same targets, methods, and invocation lists are considered equal.