Reverse MemoryStream.ToArray ()

I am getting an httpwebresponse stream (of a flash file), and I would like to save it as binary and later access that binary and display it as flash. Right now, I am writing the response stream to a MemoryStream and then calling ToArray() on the MemoryStream. I get a handy byte[].

How do I reverse that function? How do I get the stream of the flash file from the byte[] I've generated?

¡Gracias!

preguntado el 08 de noviembre de 11 a las 16:11

2 Respuestas

Super easy:

Stream s = new MemoryStream(byteArray);

Más información: http://msdn.microsoft.com/en-us/library/e55f3s5k.aspx

respondido 08 nov., 11:20

haha just got that too. I feel like an idiot for not seeing that. Thanks! - carlbenson

Puedes usar esto:

var s = new MemoryStream(byteArray);

respondido 08 nov., 11:20

No es la respuesta que estás buscando? Examinar otras preguntas etiquetadas or haz tu propia pregunta.