C#魔灵-lesson_01-Helloworld
2018-11-14 本文已影响0人
疯帮主
安装visual studio2017
新建项目
![](https://img.haomeiwen.com/i7609014/31fed5987182aad2.png)
![](https://img.haomeiwen.com/i7609014/187796e51d72c78a.png)
编写代码
在main方法内添加两条语句
// 向控制台写入hello world并换行
Console.WriteLine("Hello world.");
// 等待读入一个键盘操作,防止程序一闪而过
Console.ReadKey();
![](https://img.haomeiwen.com/i7609014/dfa41e70763579d2.png)
运行
![](https://img.haomeiwen.com/i7609014/2ebcf11b081ff21f.png)
等待片刻会弹出一个窗口,注意左下角提示
结果
![](https://img.haomeiwen.com/i7609014/7f76f9c42996b941.png)
参考文档:http://www.runoob.com/csharp/csharp-program-structure.html