001-Hello word。

2018-03-30  本文已影响0人  立秋i

 //Ctrl + k  然后 Ctrl + C 这个是一个组合快捷键 可以注释选中行

 // Ctrl + k然后Ctrl +U 取消注释选中行v

// 这里是注释 下面的是引入命名空间

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

//定义命名空间 从{开始,到}结束

namespace _001_我们的第一个c_sharp程序 {

    //定义类

    class Program {

        //定义一个Main方法

        static void Main() {

            //方法体

            Console.Write("Hello world1!");

            Console.Write("Hello world2!");

            Console.Write("Hello world3!");

            Console.WriteLine("Hello 1");

            Console.WriteLine("Hello 2");

            Console.WriteLine("Hello 3");

            Console.WriteLine("两个数相加{0}+{1}={2}", 3, 34, 34);

            Console.WriteLine("Three integers are {1},{0} and {1}", 3, 5);

            Console.ReadKey();

        }

    }

}

上一篇 下一篇

猜你喜欢

热点阅读