Lecture overview -- Keyboard shortcut: 'u'  Previous page: The classes StringReader and StringWriter -- Keyboard shortcut: 'p'  Next page: Members in the Console class -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Alphabetic index  Help page about these notes  Course home    Input and Output Classes - slide 23 : 40

The Console class

The Console class encapsulates the traditional standard input, standard output, and standard error streams

Console.In is a TextReader object.

Console.Out and Console.Error are TextWriter objects

app.cs
A program that redirects standard output and standard error to a file.
output-a
Output when running the program as App File1 File2.
File1
File 1 after the execution of the Console demo program.
File2
File 2 after the execution of the Console demo program.
output-b
Output when running the program as just App.