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

WBOY
Release: 2023-09-13 18:25:02
forward
1405 people have browsed it

C# 中的 System.Console 类及其方法是什么?

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 Methods##1234##5MoveBufferArea(Int32,Int32,Int32,Int32,Int32,Int32, Char, ConsoleColor, ConsoleColor)6OpenStandardError()7OpenStandardError(Int32)8OpenStandardInput()9OpenStandardInput(Int32)10OpenStandardOutput()11OpenStandardOutput(Int32)12Read()13ReadKey()
Sr.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.

Copy the specified source area of ​​the screen buffer to the specified destination area.

Get the standard error stream.

Get the standard error stream, which is set to The specified buffer size.

Get the standard input stream.

Get the standard input stream, which is set to The specified buffer size.

td>

Get the standard output stream.

Get the standard output stream, which is set to The specified buffer size.

From the standard input stream Read the next character.

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!

source:tutorialspoint.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!