Mark Maguire

Mark Maguire

  • NA
  • 17
  • 17.8k

How do you -- Declare a List object implementing a class type that supports events

May 16 2011 9:22 AM
I need to initialize a List object and assign it to a class type that supports events.

If I wanted to intialize my class normally to support events it would be:

        oObj = new MyClass();
        oObj.evtMyEvent += new RecordDealt(RecordRead);

I have a collection set up of MyClass using the following code:

        oObj = new List<MyClass>

How do I initialise it so that I can access events from MyClass whilst still being in a List?

Thanks
M

Answers (4)