版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/wtxhai/article/details/88659975
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Example604_02
{
class Program
{
static void Main(string[] args)
{
Console.Write("请输入姓名:");
string name = Console.ReadLine(); //接收打卡人姓名输入
if (name == "mr")
{
Console.WriteLine("打卡成功,打卡时间{0:F}", DateTime.Now); //打卡成功,显示打卡信息
}
else
{
Console.WriteLine("打开失败,用户不存在!"); //打卡失败显示信息
}
Console.ReadLine();
}
}
}