开门见山,废话不说:
using System;
class hello
{
static void Main()
{
Console.WriteLine ("hello world !");
}
}
这个程序没什么复杂的,和汇编语言相比,也就是关键词还有格式的区别,容易理解。
但是要注意的就是大小写问题,c#语言也是大小写敏感的!
编辑器刚下载好,先来试试手吧:
1.现在桌面创建一个 hello.cs文件
2.将代码复制到hello.cs文件中
3.运行-->cmd-->cd 桌面-->csc hello.cs
4.运行一下hello.exe
5.在命令提示符中打印出:hello world !
6.成功了
说明设置的csc.exe已经可以使用了,同时也说明c#学习之路正式开始!!!fighting~~~