问题
I want store an integer value in isolated storage in wp7 so that when i close and open the app again, the value should be retained. How can I obtained this?
回答1:
If it's to store a single integer value, the easiest way is to use IsolatedStorageSettings.ApplicationSettings:
// Store the value
IsolatedStorageSettings.ApplicationSettings["Whatever"] = yourValue;
// Retrieve it
yourValue = (int)IsolatedStorageSettings.ApplicationSettings["Whatever"];
来源:https://stackoverflow.com/questions/13413497/how-to-store-an-integer-value-in-isolated-storage-in-wp7