1
我想在wp7中的独立存储中存储一个整数值,这样当我关闭并再次打开应用程序时,应该保留该值。我怎么能得到这个?如何将整数值存储在wp7的独立存储中?
我想在wp7中的独立存储中存储一个整数值,这样当我关闭并再次打开应用程序时,应该保留该值。我怎么能得到这个?如何将整数值存储在wp7的独立存储中?
如果它来存储一个整数值,最简单的方法是使用IsolatedStorageSettings.ApplicationSettings
:
// Store the value
IsolatedStorageSettings.ApplicationSettings["Whatever"] = yourValue;
// Retrieve it
yourValue = (int)IsolatedStorageSettings.ApplicationSettings["Whatever"];