Convertir IMemoryRandowAccessStream a byte array (byte[]) UWP
1 2 3 4 5 |
// This is where the byteArray to be stored. var bytes = new byte[myMemoryStream.Size]; // This returns IAsyncOperationWithProgess, so you can add additional progress handling await myMemoryStream.ReadAsync(bytes.AsBuffer(), (uint)myMemoryStream.Size, Windows.Storage.Streams.InputStreamOptions.None); |
1 2 3 4 5 |
// This is where the byteArray to be stored. var bytes = new byte[myMemoryStream.Size]; // This returns IAsyncOperationWithProgess, so you can add additional progress handling await myMemoryStream.ReadAsync(bytes.AsBuffer(), (uint)myMemoryStream.Size, Windows.Storage.Streams.InputStreamOptions.None) |