System.Console

This class has already been used extensively throughout this book, but you might not be aware of a couple of points. This class allows the programmer to “redirect” the standard input, standard output, and standard error. This is how a managed application can be included as part of a Web page and the output appears on the generated Web page. In addition, it is possible for the programmer to acquire a stream associated with standard error, standard output, and standard input rather than taking the defaults in the Write, WriteLine, Read, and ReadLine methods.

Get .NET Common Language Runtime Unleashed 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.