Skip to content

Instantly share code, notes, and snippets.

@wtuts
Created June 26, 2014 18:59
Show Gist options
  • Save wtuts/5b2fc8568b7aaa056667 to your computer and use it in GitHub Desktop.
Save wtuts/5b2fc8568b7aaa056667 to your computer and use it in GitHub Desktop.
Isolated storage
//For single object data such as string
private void Save_single_object_button_click(object sender, RoutedEventArgs e)
{
//Declare the instance of Isolated Storage settings
var settings = IsolatedStorageSettings.ApplicationSettings;
if (!settings.Contains("name"))
{
//add a key value pair with key name and value chetan
settings.Add("name", "Chetan");
}
if (settings.Contains("marks"))
{
//add a key value pair with key marks and value 100
settings.Add("marks", 100);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment