title: ReadAsync get data from buffer
body: <p>I've been banging my head around this for some while (and know it's something silly).</p>
  
  <p>I'm downloading files with a ProgressBar which shows fine, but how do I get the data from the <code>ReadAsync</code> Stream to save?</p>
  
  <pre><code>public static readonly int BufferSize = 4096;
  int receivedBytes = 0;
  int totalBytes = 0;
  WebClient client = new WebClient();
  byte[] result;
  
  using (var stream = await client.OpenReadTaskAsync(urlToDownload))
  {
    byte[] buffer = new byte[BufferSize];
    totalBytes = Int32.Parse(client.ResponseHeaders[HttpResponseHeader.ContentLength]);
  
    for (;;)
    {
      result = new byte[stream.Length];
      int bytesRead = await stream.ReadAsync(buffer, 0, buffer.Length);
      if (bytesRead == 0)
      {
        await Task.Yield();
        break;
      }
  
      receivedBytes += bytesRead;
      if (progessReporter != null)
      {
        DownloadBytesProgress args = 
                   new DownloadBytesProgress(urlToDownload, receivedBytes, totalBytes);
        progessReporter.Report(args);
      }
    }
  }
  </code></pre>
  
  <p>I was trying via the result var, but that is obviously wrong. I'd appreciate any pointers on this long Sunday afternoon.</p>