开发者

How to read/write byte[] into Isolated storage

开发者 https://www.devze.com 2023-03-14 12:17 出处:网络
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:

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

精彩评论

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