Vision

C# Custom events

by admin on Aug.03, 2009, under c#

Declaring new events:

public class Service
 {

       public delegate void DataArrivalEventDelegate(string e);
       public static event DataArrivalEventDelegate DataArrival; 

}

Firing The event:

DataArrival(“Hallo”);

Subscribing to the event:

Service.DataArrival += new Service.DataArrivalEventDelegate(DataArrival);

 void DataArrival(string message)
{
}

No comments for this entry yet...

Leave a Reply

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...