初学c#-2019.1.17

using System;                                       // using 关键字——引用.net框架类库中的现有资源
using System.Collections.Generic;      // System命名空间——提供了访问 
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace test_01
{
class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello world!");      // 静态方法——写到控制台窗口上
Console.ReadKey77();                       // 告诉代码在结束前等待按键
}
}

}


// 不同于c的一个数据类型 decimal类型 ——不遵守四舍五入规则的十进制数,默认为0.0m
// 内置引用类型——object 根类型 .net框架中所有类型都由其派生而来
// 类型转换用类 Convert ——Convert.To类型()

//   foreach语句 
/* foreach(数据类型 变量名 in 数组名)
* {
* 语句;
* }
*/

/* 如果远方呼喊我 我就走向远方 如果大山召唤我 我就走向大山 */
原文地址:https://www.cnblogs.com/huangbin1994/p/10285954.html