4
Reply

Event Handling C#2.0

Abdul Asif

Abdul Asif

Jan 25 2008 2:15 AM
9.1k

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
    }

}


Upload Source Code  Select only zip and rar file.
Answers (4)