我搜索并找到了这个,但是Windows 8无法使用它,只适用于Windows应用程序:
http://msdn.microsoft.com/en-us/library/windows/apps/windows.storage.fileio.writebytesasync
我如何在WP8中做到这一点?
发布于 2013-10-30 14:55:57
您可以使用二进制编写器:
byte[] buffer;
using (IsolatedStorageFile ISF = IsolatedStorageFile.GetUserStoreForApplication())
{
using (IsolatedStorageFileStream FS = new IsolatedStorageFileStream(fileName, FileMode.Create, ISF))
{
using (BinaryWriter BW = new BinaryWriter(FS))
{
BW.Write(buffer, 0, buffer.Lenght);
}
}
}或者让它变得更简单,就像KooKiz说的:
using (IsolatedStorageFileStream FS = new IsolatedStorageFileStream(fileName, FileMode.Create, ISF))
{
FS.Write(buffer, 0, buffer.Lenght);
}https://stackoverflow.com/questions/19685114
复制相似问题