开发者

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);
  }
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜