title: Creating a byte array from a stream
body: <p>What is the prefered method for creating a byte array from an input stream? </p>
  
  <p>Here is my current solution with .NET 3.5. </p>
  
  <pre><code>Stream s;
  byte[] b;
  
  using (BinaryReader br = new BinaryReader(s))
  {
      b = br.ReadBytes((int)s.Length);
  }
  </code></pre>
  
  <p>Is it still a better idea to read and write chunks of the stream?</p>