The System.Console class in C# represents the standard input, output, and error streams for a console application.
The following are some methods of the System.Console class-
Reference: MSDN System Class MethodsSr.No | Methods and instructions |
---|---|
Beep()Play the beep sound through Console speakers. | |
Beep(Int32,Int32) Play the specified frequency through the console speaker and duration of the beep. | |
Clear()Clear the console buffer and corresponding console window display information. | |
Move buffer(Int32,Int32,Int32,Int32,Int32,Int32) p>Copy the specified source area of the screen buffer to the specified destination area. | |
MoveBufferArea(Int32,Int32,Int32,Int32,Int32,Int32, Char, ConsoleColor, ConsoleColor) | Copy the specified source area of the screen buffer to the specified destination area. |
OpenStandardError() | Get the standard error stream. |
OpenStandardError(Int32) | Get the standard error stream, which is set to The specified buffer size. |
Get the standard input stream. | |
OpenStandardInput(Int32) |
Get the standard input stream, which is set to The specified buffer size.
td> |
OpenStandardOutput() | Get the standard output stream. |
OpenStandardOutput(Int32) | Get the standard output stream, which is set to The specified buffer size. |
Read() | From the standard input stream Read the next character. |
ReadKey() | Get the next character or function pressed by the user key. The key pressed will be displayed in the console window. |
The above is the detailed content of What is the System.Console class and its methods in C#?. For more information, please follow other related articles on the PHP Chinese website!