What is the System.Console class and its methods in C#?

CsharpProgrammingServer Side Programming

The System.Console class in C# represents the standard input, output, and error streams for console applications.

The following are some of the methods of the System.Console class −

Refer: MSDN System Class methods

Sr.NoMethod & Description
1Beep()
Plays the sound of a beep through the console speaker.
2Beep(Int32,Int32)
Plays the sound of a beep of a specified frequency and duration through the console speaker.
3Clear()
Clears the console buffer and corresponding console window of display information.
4MoveBufferArea(Int32,Int32,Int32,Int32,Int32,Int32)
Copies a specified source area of the screen buffer to a specified destination area.
5MoveBufferArea(Int32,Int32,Int32,Int32,Int32,Int32, Char, ConsoleColor, ConsoleColor)
Copies a specified source area of the screen buffer to a specified destination area.
6OpenStandardError()
Acquires the standard error stream.
7OpenStandardError(Int32)
Acquires the standard error stream, which is set to a specified buffer size.
8OpenStandardInput()
Acquires the standard input stream.
9OpenStandardInput(Int32)
Acquires the standard input stream, which is set to a specified buffer size.
10OpenStandardOutput()
Acquires the standard output stream.
11OpenStandardOutput(Int32)
Acquires the standard output stream, which is set to a specified buffer size.
12Read()
Reads the next character from the standard input stream.
13ReadKey()
Obtains the next character or function key pressed by the user. The pressed key is displayed in the console window.
raja
Published on 16-Aug-2018 09:12:31
Advertisements