002C#控制台程序的基本结构

利用#region 和#endregion 来定义展开和折叠的区域代码

 1 #region
 2 using System;
 3 using System.Collections.Generic;
 4 using System.Linq;
 5 using System.Text;
 6 
 7 namespace ConsoleApplication1
 8 {
 9     class Program
10     {
11         static void Main(string[] args)
12         {
13             Console.WriteLine("My frist app on the c#");
14             Console.Read();
15         }
16     }
17 }
18 
19 #endregion

其实以#开头的关键字都是一组预处理命令,严格的说并不是c#关键字,除了#region 和#endregion 之外,其他关键字都相当复杂,用法也比较专业。

posted @ 2016-04-03 18:08  Releed  阅读(746)  评论(0编辑  收藏  举报