Abdul Asif

Abdul Asif

  • NA
  • 27
  • 0

Event Handling C#2.0

Jan 25 2008 2:15 AM

Hi All,

I am working on a project that requires handling of custom events. Some class will raise the DataEvent of RaiseEventClass. I have to implement event handler for the DataEvent in the RaiseEventClass. Please help me how to implement event handler. Please show some codes if possible.
Below is the skeleton of the class.
Thanks in advance! 
 
public class RaiseEventClass
{
    public delegate void RaiseEventDelegate(ArrayList files);
    public event RaiseEventDelegate DataEvent;
   
   
    public void SearchFiles(ArrayList list)
    {
          DataEvent(list); //raising event for testing
    }

}


Answers (4)