3.1. Console class and applications

Using the System.Console class, we can implement the simplest .NET application – a console application that runs in a system-supplied window and does not require a graphical user interface. Since in this and several other chapters of this book we will use the console applications heavily, we will start this chapter with an overview of the Console class.

The Console class represents the standard input, output, and error streams. Applications built on this class can read characters from the standard input stream and write characters to the standard output stream. Errors are written to the standard error output stream. These three streams are automatically associated with the console on which the application ...

Get A Programmer's Guide to .NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.