黑马程序员C#学习两句话

来源:互联网 发布:开启电脑网络限制 编辑:程序博客网 时间:2024/06/06 04:00

------- Windows Phone 7手机开发.Net培训、期待与您交流! -------

 

一、Console.WriteLine();        //控制台中将括号中的内容打印显示出来

         Console.ReadKey();          //控制台中程序暂停,按下任意键继续

二、Console.WriteLine() Console.Write() 区别

         Console.WriteLine(); //打印完成后换行

         Console.Write()        //打印完成后不换行

         例如:

         using System;

         using System.Collections.Generic;

         using System.Linq;

         using System.Text;

 

namespace _01学习两句话

{

         class Program

         {

                   static void Main(string[] args)

                   {

                            Console.WriteLine(“第一行”);

                            Console.WriteLIne(“第二行”);

                            Console.Write(“第三行”);

                            Console.Write(“第四行”);

         Console.ReadKey();

}

}

}

显示结果为:

第一行

第二行

第三行第四行

 

 

 

 

------- Windows Phone 7手机开发.Net培训、期待与您交流! -------

原创粉丝点击