Wednesday, March 28, 2012

WP7: Isolated Storage

To store app data so that it can be restored when app is tombstoned/deactivated and then restored. stored in key/value pairs


IsolatedStorageSettings setting = IsolatedStorageSettings.ApplicationSettings;
 if (!setting.Contains("rounds")) // check if key exists
 {
     setting.Add("rounds", rounds); // if not, create new key
}
 else
{
      setting["rounds"] = rounds; // if exists, just change the value
}

Reference: http://create.msdn.com/en-US/education/quickstarts/Isolated_Storage

No comments: