Jason,
"Jason L James" <ja***@nospam.divemaster.org> schrieb:
I have a class (class 1) that raises a couple of events.
I also have another class (class 2) that contains a hashtable
of objects that are of type class 1.
Is there anyway of trapping the events raised by one
of the objects in the hashtable in class 2 and processing
the event in class 2?
You can add a common handler for 'class1''s event using 'AddHandler' for
each instance of 'class1'. The event handler's 'sender' parameter will
contain a reference to the object that raised the event. 'RemoveHandler'
can be used to remove a handler.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>