Example Of Use
Let us show the state of a client during connection, this reads as either one narrative but it is also put into sections for ease in searching through it.
Setting Up
Prior to connection, the server is empty. First, the client initializes the subscriptions and shared dictionary. If you constructed the shared dictionary using the interface builder, this is already done fore you.
SharedDictionary SD = new SharedDictionary();
Subscription subscription1 = new Subscription();
Subscription subscription2 = new Subscription();

Getting Connected
Next, the client connects to the server. The use of the Opened and Closed event handlers lets us receive notification when the connection to the shared dictionary is either established or broken.
this.SD.Url = url;
this.SD.Opened += new EventHandler(SD_Opened);
this.SD.Closed += new EventHandler(SD_Closed);
this.SD.Open();

Registering Subscriptions
After the opened event call back is received, we are finally able to register the subscription. As a result, it is often useful to put the subscription statements right in the Opened event handling routine. When the subscription is received, we receive an initial value, the one in the dictionary at the time of subscription. This generates a notification event. Since the entry did not previously exist in the local dictionary, it is an “add” event.
private void SD_Opened(object sender, System.EventArgs args)
{
this.subscription1.BeginInit();
this.subscription1.Dictionary = this.SD;
this.subscription1.Pattern = "/A";
this.subscription1.Notified += new GroupLab.GTNetworking.SubscriptionEventHandler(this.s_Notified);
this.subscription1.EndInit();
}

GOTCHA: Trying to access an entry you are not subscribed to
Because of the architecture of the shared dictionary, any entry that you have not subscribed to has not been sent to your client. Attempting to access these entries will result in a null pointer exception. The simple fix is simply to add a subscription to this entry.
Expanding the Example
Suppose now there is another client in the network that has a “/*” subscription, that is, to everything in the dictionary.

Setting Values in the Dictionary
Suppose now the original client makes a change to the “/A” field. This change is received by the server and is then propagated to the other client. When a client makes or receives a change to a value in its dictionary, it generates a notification event. This is a “change” notification event.
this.SD["/A"] = 7;
GOTCHA: Setting an entry that you are not subscribed to
Interestingly, Clients can change entries that they are not subscribed to. This allows them to send data to those that are subscribed to that entry, however care must be taken not to request any entry that a client is not subscribed to. It is probably safer simply to subscribe to any entry that you intend to change.

Now suppose that the other client makes a change to the “/B” entry. This message is propagated to the server, but since there are no other subscribers to that entry, this update is not sent to any other client.
this.SD["/B"] = 5;

Now suppose that the other client creates a new “/D” entry. This message is propagated to the server, but since there are no other subscribers to that entry, this update is not sent to any other client.
this.SD["/D"] = 4;

Interestingly, Clients can change entries that they are not subscribed to. This allows them to send data to those that are subscribed to that entry; however care must be taken not to request any entry that a client is not subscribed to. Generally, if you intend to edit an entry, you should be a subscriber to that entry.