1,新建项目-控制台应用程序
2,在生成的模版框架中添加如下代码
using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace ConsoleApplication1 { class Program { static void Main(string[] args) { Console.WriteLine("HELLO WORLD!"); // 这里添加代码 } } }
3,按F5或点击集成编译环境中的绿色箭头,开始调试程序。如果程序无误程序将以调试的方式运行。黑色窗体闪了一下就没了。因为程序在屏幕上打印“HELLO WORLD!”之后就结束了。如果希望程序运行结束后不自动退出,可以按CTRL+F5,或菜单-调试-开始执行(不调试)。这样程序的运行结果如下图所示。
【END】
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12639172/viewspace-609084/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/12639172/viewspace-609084/