using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Example31
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Title = "循环向控制台中输入内容"; //定义控制台标题
            Console.WindowWidth = 30;               //窗体宽度
            Console.WindowHeight = 2;               //窗体高度
            for (; ; )                              //开始无限循环当前时间
            {
                Console.WriteLine("当前系统时间是:{0}", DateTime.Now.ToString("dd 日 hh:mm:sss")); //输出系统当前时间
                System.Threading.Thread.Sleep(1000);//线程挂起一秒钟
                Console.Clear();                    //清空控制台信息
            }
        }
    }
}
posted on 2011-10-17 01:34  C#_初学者  阅读(850)  评论(0编辑  收藏  举报