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 and notes together  slide -- Keyboard shortcut: 't'  Textbook -- Keyboard shortcut: 'v'  Help page about these notes  Alphabetic index  Course home  Page 23 : 40
Object-oriented Programming in C#
Input and Output Classes
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

/user/normark/oop-csharp-1/sources/c-sharp/io/console/app.csA program that redirects standard output and standard error to a file.


/user/normark/oop-csharp-1/sources/c-sharp/io/console/output-aOutput when running the program as App File1 File2.


/user/normark/oop-csharp-1/sources/c-sharp/io/console/File1File 1 after the execution of the Console demo program.


/user/normark/oop-csharp-1/sources/c-sharp/io/console/File2File 2 after the execution of the Console demo program.


/user/normark/oop-csharp-1/sources/c-sharp/io/console/output-bOutput when running the program as just App.