完全不借助VS,编写C#控制台应用程序

(因为这个必须要借助控制台,所以必须是控制台应用程序)
csc.exe是微软.NET Framework 中的C#编译器
步骤如下:
1)用记事本写一个控制台应用程序的代码,保存在E盘,test.cs
using System;
namespace Test
{
class Program
{
static void Main(string[]args)
{
Console.WriteLine("生活会更加美好的");
Console.ReadKey();
}
}
}

 

2)打开cmd运行进入test.cs所在文件夹(E盘),执行:
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\csc.exe test.cs(我本机的地址是这个)
就会发现E盘中多了一个test.exe文件,执行test.exe.

 

posted @ 2015-08-17 14:59  lucy嘻嘻嘻嘻  阅读(620)  评论(0编辑  收藏  举报