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