title: Why its not working?
body: <pre><code>BinaryReader br = new BinaryReader(Console.OpenStandardInput());
  BinaryWriter bw = new BinaryWriter(Console.OpenStandardOutput());
  
  int n = br.ReadInt32();
  bw.Write(n);
  </code></pre>
  
  <p>always getting this error:</p>
  
  <pre><code>Unhandled Exception: System.IO.EndOfStreamException: Failed to read past end of stream.
  at System.IO.BinaryReader.FillBuffer (Int32 numBytes) [0x00000] in &lt;filename unknown&gt;:0 
  at System.IO.BinaryReader.ReadInt32 () [0x00000] in &lt;filename unknown&gt;:0 
  at Program.Main () [0x00025] in /home/skydos/ACM/Csharp/Csharp/Main.cs:24 
  </code></pre>
  
  <p>Is there any way to make reading data in C# faster from Console?</p>