0
我是windows phone开发中的新手。现在我正在尝试研究隔离的存储设置。 我google了一下关于独立的存储设置,并按照我的理解做了一个样本。但它显示编译错误。我知道它是一个非常简单的错误。孤立的存储设置问题
在行
var names = IsolatedStorageSettings.ApplicationSettings; // Here it showing an error that
“的类型或命名空间名称的applicationSettings'不存在命名空间‘IsolatedStorageSettings’存在(是否缺少程序集引用?)”。
我导入了类库。但问题仍然存在。
我粘贴了下面的代码。
Thankx。
using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;
using Microsoft.Phone.Controls;
using System.IO.IsolatedStorage;
using System.IO;
namespace IsolatedStorageSettings
{
public partial class MainPage : PhoneApplicationPage
{
// Constructor
public MainPage()
{
InitializeComponent();
var names = IsolatedStorageSettings.ApplicationSettings;
names.Add("myName", "Developer John");
displayText.Text = names["myName"].ToString();
}
}
}
Thankx santhu。那是问题.. – Arun 2012-03-02 06:53:14
如果我想要将图像和一些变量存储在一起,该怎么办? – CodeGuru 2012-06-06 17:39:35