Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>IsolatedStorage Settins works like a <a href="http://msdn.microsoft.com/en-us/library/windowsphone/develop/system.io.isolatedstorage.isolatedstoragesettings%28v=vs.105%29.aspx" rel="nofollow">dictionary</a>.<BR> I think you should change:</p> <pre><code>private IsolatedStorageSettings userSettings = IsolatedStorageSettings.ApplicationSettings; </code></pre> <p>I would rather use method Contains to check whether key is there:</p> <pre><code>if (userSettings.Contains("ICE1")|| userSettings.Contains("ICE2") || userSettings.Contains("ICE3") || userSettings.Contains("address") || userSettings.Contains("fullName")) </code></pre> <p>According to <a href="http://msdn.microsoft.com/en-us/library/windowsphone/develop/system.io.isolatedstorage.isolatedstoragesettings.save%28v=vs.105%29.aspx" rel="nofollow">MSDN</a>, Settings are saved when the Application is closed or you call Save:</p> <pre><code>Data written to the IsolatedStorageSettings object is saved when the application that uses the class is closed. If you want your application to write to isolated storage immediately, you can call the Save method in application code. </code></pre> <p><strong>EDIT</strong><BR> Sample code to play with:<BR></p> <pre><code>public partial class MainPage : PhoneApplicationPage { private IsolatedStorageSettings userSettings = IsolatedStorageSettings.ApplicationSettings; public MainPage() { InitializeComponent(); bool isKey = userSettings.Contains("anyKey"); //toggle break point at this line userSettings.Add("anyKey", "myValue"); isKey = userSettings.Contains("anyKey"); string value = (string)userSettings["anyKey"]; } } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload