Lecture overview -- Keyboard shortcut: 'u'  Previous page: The Console class -- Keyboard shortcut: 'p'  Next page: Directories and Files [Section] -- 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 24 : 40
Object-oriented Programming in C#
Input and Output Classes
Members in the Console class

The Console class offers a rich repertoire of possibilities

All properties and methods in Console are static

  • Access to and control of In, Out, and Error

  • Write, WriteLine, Read, and ReadLine methods

    • Shortcuts to Out.Write, Out.WriteLine, In.Read, and In.ReadLine

  • Many properties and methods that control the underlying buffer and window

    • Size, colors, and positions

  • Immediate, non-blocking input from the Console

    • The property KeyAvailable returns if a key is pressed (non-blocking)

    • ReadKey() returns info about the pressed key (blocking)

  • Other operations

    • Clear(), Beep(), and Beep(int, int) methods.