public override int Read () { try { ConsoleKeyInfo key = Console.ReadKey (); return key.KeyChar; } catch (IOException) { } return(-1); }