[英]How to store an integer value in isolated storage in wp7?
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. 我想将整数值存储在wp7中的隔离存储中,以便当我再次关闭并打开应用程序时,应保留该值。 How can I obtained this? 我如何获得这个?
If it's to store a single integer value, the easiest way is to use IsolatedStorageSettings.ApplicationSettings
: 如果要存储单个整数值,最简单的方法是使用IsolatedStorageSettings.ApplicationSettings
:
// Store the value
IsolatedStorageSettings.ApplicationSettings["Whatever"] = yourValue;
// Retrieve it
yourValue = (int)IsolatedStorageSettings.ApplicationSettings["Whatever"];
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.