谁能告诉我如何在 WP7 中读取和写入字节数组到独立存储文件中?
最佳答案
IsolatedStorageFileSystem
有一个写字节数组的方法:
public override void Write(byte[] buffer, int offset, int count);
它可以按如下方式使用:
byte[] myByteArray = ...
using (var store = IsolatedStorageFile.GetUserStoreForApplication())
using (var stream = new IsolatedStorageFileStream("filename.txt",
FileMode.Create, FileAccess.Write, store))
{
stream.Write(myByteArray, 0, myByteArray.Length);
}
关于windows-phone-7 - 如何将字节 [] 读/写到隔离存储中,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6420565/