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