In Windows 8; I would like to pass the contents of a MemoryStream to a class that accepts a parameter of type Windows.Storage.Streams.IRandomAccessStream. Is there any way t
There is no built-in way method on Windows 8. For Windows 8.1 we added a Stream.AsRandomAccessStream() extension method:
internal static IRandomAccessStream ToRandomAccessStream(byte[] array) { MemoryStream stream = new MemoryStream(array); return stream.AsRandomAccessStream(); }