title: Must call EndRead() in ALL cases?
body: <p>Related to asynchronous IO using a (bidirectional) NetworkStream, <a href="http://msdn.microsoft.com/en-us/library/system.io.stream.beginread.aspx" rel="noreferrer">MSDN</a> says that "EndRead must be called once for every call to BeginRead."</p>
  
  <p>Is this true even for cases where the EndRead() will throw an exception, such as in the case that the NetworkStream has been closed after the BeginRead() has been issued?</p>
  
  <p>I don't want the overhead of the throwing of the exception, but neither do I want to leak OS precious resources reserved by BeginRead().</p>
  
  <p>I also know that the stream could be closed between a test of the stream's state and the conditional EndRead(), but if EndRead() can be omitted when we <em>know</em> the stream is closed, that will save on the exception handling in the majority case.</p>
  
  <p>Am I doing it wrong?</p>
  
  <p>Thanks!</p>