Skip to content

Instantly share code, notes, and snippets.

@zacktian89
Created September 3, 2013 10:33
Show Gist options
  • Select an option

  • Save zacktian89/6422225 to your computer and use it in GitHub Desktop.

Select an option

Save zacktian89/6422225 to your computer and use it in GitHub Desktop.
IRandomAccessStream to Byte Array
var reader = new DataReader(myMemoryStream.GetInputStreamAt(0));
var bytes = new byte[myMemoryStream.Size];
await reader.LoadAsync((uint)myMemoryStream.Size);
reader.ReadBytes(bytes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment