我有隔离存储的问题。
这是我的代码:
List<Notes> data = new List<Notes>();
using (IsolatedStorageFile isoStore =
IsolatedStorageFile.GetUserStoreForApplication())
{
using (IsolatedStorageFileStream isoStream =
isoStore.OpenFile("Notes.xml", FileMode.OpenOrCreate))
{
XmlSerializer serializer = new XmlSerializer(typeof(List<Notes>));
data = (List<Notes>)serializer.Deserialize(isoStream);
}
}
data.Add(new Notes() { Note = "hai", DT = "Friday" });
return data;
错误:IsolatedStorageFileStream 上不允许操作。在
using (IsolatedStorageFileStream isoStream =
isoStore.OpenFile("Notes.xml", FileMode.OpenOrCreate))