How To Retrieve Values From The Shared Dictionary
<< Back to the .Networking page
Integer: retrieves an integer from a shared dictionary called SD at the path /value:
int x = (int) this.SD.GetEntry("/value").Value;
String: retrieves a string from a shared dictionary called SD at the path /value:
string y = this.SD.GetEntry("/value").Value.ToString();
Vector: retrieves a vector from a shared dictionary called SD at the path /value:
SharedDictionary.Vector v = this.SD["/value"] as SharedDictionary.Vector;
Vector Elements: retrieves an integer from the last element of a vector. The vector is in the shared dictionary called SD at the path /value.
SharedDictionary.Vector v = this.SD["/value"] as SharedDictionary.Vector;
int z = (int) v[0];
int z = (int) v[0];
Subscription Notifications: retrieves a string from the shared dictionary during a subscription notification.
private void sub_Notified(object sender, SubscriptionEventArgs e)
{
string location = (string) e.Entry.Value;
}
{
string location = (string) e.Entry.Value;
}