How to read/write byte[] into Isolated storage
Can anyone tell me how to read开发者_StackOverflow and write byte array into Isolated Storage file in WP7?
IsolatedStorageFileSystem
has a method for writing byte arrays:
public override void Write(byte[] buffer, int offset, int count);
It can be used as follows:
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);
}
精彩评论