title: TcpClient and NetworkStream dispose problem
body: <p>I'm using this piece of code to process a connection to a server and read data from the client</p>
  
  <pre><code>using(var client = _listener.EndAcceptTcpClient(ar))
  {
          var clientStream = client.GetStream();
          // Get the request message 
          Messages.ReceiveMessage(clientStream, msg =&gt; ProcessRequest(msg, clientStream));
  }
  </code></pre>
  
  <p>Now, the ReceiveMessage method calls <code>BeginRead()</code> on the Stream passed as a parameter, but I'm getting an ObjectDisposedException.</p>
  
  <p>I know that a solution is to call stream.Dispose() when I don't need the Stream anymore, but I'm really looking for a solution where I can maintain the use of the <code>using</code> clause.</p>
  
  <p>Thanks</p>