首页 > 其他 > 详细

Dissecting the First C# Program "HelloWorld"

时间:2014-01-16 20:42:47      阅读:330      评论:0      收藏:0      [点我收藏+]
bubuko.com,布布扣
//Tells the complier that this program uses types from the System namespace.
using System; 
//Declares a new namespace, called HelloWorld
//A namespace is a set of type declarations associated with a name. namespace HelloWorld { //Declares a new class type, called Program class Program { //Declares a method called Main as a member of class Program //Main is a special function used by the complier as the starting point of the program. static void Main(string[] args) { //Contains only a single, simple statement; this line constitutes the body of Main. //Simple statements are terminated by a semicolon. //This statement uses a class called Console, in namespace System, to print out the message to a window on the screen //Without the using statement in line 1, the compiler wouldn‘t have known where to look for class Console. Console.WriteLine("Hello World!"); } } }
bubuko.com,布布扣

Dissecting the First C# Program "HelloWorld"

原文:http://www.cnblogs.com/limeina/p/3518645.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!