// ignore other console output Console.SetOut(TextWriter.Null); Console.Write("this text gets lost") // create any stream using (var stream = File.Open("image.png")) { // get the STDOUT stream var consoleStream = Console.OpenStandardOutput(); stream.Position = 0; // reset position to read all data stream.CopyTo(consoleStream); consoleStream.Flush(); }
510100cookie-checkC# Copy stream to Console