How To Register Event Handlers

<< Back to the .Networking page

The following lines set up the commonly used event handlers for a Shared Dictionary:

this.SD.Connected += new EventHandler(SD_Connected);
this.SD.Disconnected +=new DisconnectedEventHandler(SD_Disconnected);

this.SD.Opened +=new EventHandler(SD_Opened);
this.SD.Closed +=new EventHandler(SD_Closed);

The following line sets up the commonly used event handler for a Subscription:

this.sub.Notified+=new SubscriptionEventHandler(sub_Notified);