How to store an integer value in isolated storage in wp7?

百般思念 提交于 2020-01-03 01:34:05

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!