如何在 wp7 的隔离存储中存储整数值? [英] How to store an integer value in isolated storage in wp7?
本文介绍了如何在 wp7 的隔离存储中存储整数值?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 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. How can I obtained this?
推荐答案
如果是存储单个整数值,最简单的方法是使用 IsolatedStorageSettings.ApplicationSettings
:
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"];
这篇关于如何在 wp7 的隔离存储中存储整数值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文