title: NetworkStream.Read throws no exception
body: <p>I cannot get this example to run:
  <a href="https://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient%28v=vs.110%29.aspx" rel="nofollow noreferrer">https://msdn.microsoft.com/en-us/library/system.net.sockets.tcpclient%28v=vs.110%29.aspx</a></p>
  
  <p>The only thing Ive changed with their code is to put everything in the main method, and my port name of course. I Can connect to my server, and even send data. But on the line</p>
  
  <pre><code>Int32 bytes = networkStream.Read(data, 0, data.Length); 
  </code></pre>
  
  <p>The program stops running without an exception. How can microsoft own code not work? My server doesnt send anything yet, but I dont think that should matter? (It recieves perfectly though.) Ive Read something that you cannot se exceptions in other threads, but I dont have any. 
  I also tried this thread: 
  <a href="https://stackoverflow.com/questions/30272106/c-sharp-tcp-socket-networkstream-read-wont-work-with-8-1">C# tcp socket (networkstream.read won&#39;t work with 8.1)</a></p>
  
  <p>It doesnt work. I run win 7 thoguh. But I wish this to work an all new windows.</p>