官术网_书友最值得收藏!

Discussing code

We have gone through the console application and discussed what a typical console application contains and how we can set various things using Visual Studio. Now let's discuss our code, which was written in the previous section, Understanding a typical C# program.

Console is a static class of a System namespace and it can't be inherited.

In the said code, we instructed the program to write something to the console as an output with the help of the WriteLine() method.

The official definition of Console class is as follows (https://docs.microsoft.com/en-us/dotnet/api/system.console?view=netcore-2.0):

Represents the standard input, output, and error streams for console applications. This class cannot be inherited.

Console is nothing but an operating system's terminal-windows (also known as Console User Interface (CUI))to interact with users. Windows operating system has console, that is, Command Prompt that accepts MS-DOS commands. In this way, the Console class provides basic support to achieve this.

Here are a few important operations we can do with the console.

主站蜘蛛池模板: 迭部县| 大关县| 普兰县| 玛纳斯县| 内江市| 来宾市| 鸡西市| 星子县| 休宁县| 奉节县| 八宿县| 大港区| 于都县| 五大连池市| 沧州市| 余江县| 辽阳市| 原平市| 临桂县| 鹤峰县| 石首市| 西平县| 康平县| 长垣县| 乌拉特前旗| 芒康县| 万载县| 乐都县| 石台县| 洱源县| 盐城市| 通化县| 澄城县| 寿阳县| 北京市| 桃园市| 科技| 镇江市| 安阳市| 虎林市| 隆德县|