我正在尝试使用Xamarin的Mono stuff(MonoTouch和MonoDroid)构建应用程序。我正在尝试编写一些代码,允许我将内容放入本地存储中。来自Windows Phone背景,我认为这也是Xamarin世界推荐的方法。在Windows Phone,我会做以下几点:在Xamarin中使用IsolatedStorage
IsolatedStorageSettings clientStorage = IsolatedStorageSettings.ApplicationSettings;
if (clientStorage != null)
{
if (clientStorage.Contains("myKey"))
clientStorage["myKey"] = value;
else
clientStorage.Add("myKey", value);
clientStorage.Save();
}
虽然Xamarin堆栈提供System.IO.IsolatedStorage
,它不提供IsolatedStorageSettings
类。现在,我感觉卡住了,我找不到一个例子。我的问题是,如何在Mono应用程序中将独立存储的价值?
谢谢
这将是很高兴看到这个答案更多的解释。 – 2013-08-08 17:42:07