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 (
MemoryStream ms = new MemoryStream(); file.PostedFile.InputStream.CopyTo(ms); var byts = ms.ToArray(); ms.Dispose();