in my WP7 application, I'm doing :
string userName = IsolatedStorageSettings.ApplicationSettings.Contains("UserName") ? IsolatedStorageSettings.ApplicationSettings["UserName"].ToString() : null;
if (string.IsNullOrEmpty(userName))
IsolatedStorageSettings.ApplicationSettings["UserName"] = "test";
I launch my app (F5), off course, the userName is empty, so it's stored in isolated storage.
I stop my app (stop debugging), and I don't close emulator
Launch again my app (F5), but still empty .
I've read that the isolated storage should persist while the emulator isn't closed.
What am I doing wrong ?
Thanks in advance for your answer.
You need to also call
IsolatedStorageSettings.ApplicationSettings.Save();
after you've changed the settings.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With