当前位置:网站首页>Take you to create your first C program (recommended Collection)
Take you to create your first C program (recommended Collection)
2022-07-25 15:27:00 【꧁ small ۣۖ Pigeon ۣۖ Puzi ۣۖ ิ꧂】
Knowing about console applications is usually knowing C# The first step in the application , It is a similar DOS The program of input and output in the interface of , It's learning C# The basic syntax of the program is the most convenient program .
Next, let's introduce how to create a console application .
Creating a console application is very simple , Choose in turn “ file ” One “ newly build ” One “ project ” command , The dialog box as shown in the following figure will pop up .
Choose among them “ Console Application ” Options , And set a name for the project 、 Location and solution name , single click “ determine ” Button to create a console application , The effect is shown below .
Note that the solution name is not necessarily the same as the project name , Multiple projects are allowed in the same solution .
As can be seen from the interface shown in the figure above, a new interface named Solution Solutions for , And in this solution, we created a project named Test Console application for .
stay Test The application contains a file called Program.cs Class files , The code in this file is shown in the figure below .
In this code, the 11 Go to the first place 13 Line is Main Method ,Main Method is a special method , And there can only be one in each class , Just write the code to Main In the method , After the project runs Main The code in the method will execute .
Apply on the console The method of outputting content in the console interface of the program is as follows .
Console.Write(); // Output content to the console interface without line break
Console.WriteLine(); // Line feed output content to the console interface
Now use the console application to output to the console “ first C# Program ” and “ This is a console application ”, The code for the implementation is as follows .
namespace test
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine(" first C# Program ");
Console.WriteLine(" This is the first console program ");
}
}
}
Press Ctrl+F5 Key combinations run programs , The effect is shown below .

边栏推荐
- ML - 语音 - 语音处理介绍
- UITextField的inputView和inputAccessoryView注意点
- ML - natural language processing - Introduction to natural language processing
- Iframe nested other website page full screen settings
- wait()和sleep()的区别理解
- Maxcompute SQL 的查询结果条数受限1W
- Once spark reported an error: failed to allocate a page (67108864 bytes), try again
- Xcode添加mobileprovision证书文件报错:Xcode encountered an error
- JVM parameter configuration details
- Xcode added mobileprovision certificate file error: Xcode encoded an error
猜你喜欢

Spark partition operators partitionby, coalesce, repartition

获取键盘按下的键位对应ask码

matlab--CVX优化工具包安装

Remember that spark foreachpartition once led to oom

Recommend 10 learning websites that can be called artifact

BPSK调制系统MATLAB仿真实现(1)

解决vender-base.66c6fc1c0b393478adf7.js:6 TypeError: Cannot read property ‘validate‘ of undefined问题

NPM's nexus private server e401 E500 error handling record

图论及概念

Spark AQE
随机推荐
获取键盘按下的键位对应ask码
看到很多App出现闪烁的图片,特别是会员页面
window系统黑窗口redis报错20Creating Server TCP listening socket *:6379: listen: Unknown error19-07-28
Spark 判断DF为空
带你详细认识JS基础语法(建议收藏)
Remember that spark foreachpartition once led to oom
spark分区算子partitionBy、coalesce、repartition
Spark AQE
ML - 自然语言处理 - 自然语言处理简介
C language function review (pass value and address [binary search], recursion [factorial, Hanoi Tower, etc.))
ML - 语音 - 高级语音模型
Args parameter parsing
ML - 自然语言处理 - 基础知识
JVM知识脑图分享
C#精挑整理知识要点9 集合2(建议收藏)
Implementation of asynchronous FIFO
How to update JSON values in the database?
<栈模拟递归>
Spark memory management mechanism new version
2019陕西省省赛K-变种Dijstra