windows-phone-8

Storing Application Settings

Adding a value

//Add value to Isolated Storage Settings    
IsolatedStorageSettings.ApplicationSettings.Add("Key", "Value");

Checking if a value exists

//Check if a value exists in settings already
if (IsolatedStorageSettings.ApplicationSettings.Contains("Key"))
{
    //perform logic
}

Reading the value

string setting = IsolatedStorageSettings.ApplicationSettings["Key"] as string;

Saving the settings

IsolatedStorageSettings.ApplicationSettings.Save();

This modified text is an extract of the original Stack Overflow Documentation created by the contributors and released under CC BY-SA 3.0 This website is not affiliated with Stack Overflow