c# hello world csc编译。

来源:互联网 发布:短域名扫描 编辑:程序博客网 时间:2024/06/05 00:37

1、确认.Net环境

控制面板或 C:\WINDOWS\Microsoft.NET\Framework\v3.5  下是否有csc.exe

2、环境变量\系统变量添加设置path为如上路径。

3、txt编辑程序hello.cs

using System;
public class HelloWorld {
static void Main() {
Console.WriteLine("Hello World!");
}
}

 

4、cmd下 csc hello.cs编译后,默认在C:\Documents and Settings\Administrator生成hello.exe,运行hello显示。

 

原创粉丝点击