标签:
static void Main(string[] args)
{
DateTime a = DateTime.Now;
DateTime nz=Convert.ToDateTime("2015-4-2 17:30");
while (true)
{
a = a.AddMinutes(1);
if (nz.ToShortTimeString().Equals(a.ToShortTimeString()))
{
Console.WriteLine(a + "起床啦!");
Console.Write("是否关闭闹钟?Y/N");
string s = Console.ReadLine();
if (s=="y.ToUpper()")
{
break;
}
else
{
nz = nz.AddMinutes(5);
}
}
}
}
标签:
原文地址:http://www.cnblogs.com/dlexia/p/4389059.html