What is the prefered method for creating a byte array from an input stream?
Here is my current solution with .NET 3.5.
Stream s; byte[] b; using (
i was able to make it work on a single line:
byte [] byteArr= ((MemoryStream)localStream).ToArray();
as clarified by johnnyRose, Above code will only work for MemoryStream