string recordTime=IniHandle.ReadSetting("时间记录","RecordTime");
if (string.IsNullOrEmpty(recordTime))
{
IniHandle.WriteSetting("时间记录","RecordTime",DateTime.Now.ToString("yyyy-MM-dd"));
}
recordTime = IniHandle.ReadSetting("时间记录", "RecordTime");
if (Convert.ToDateTime(recordTime) != Convert.ToDateTime(DateTime.Now.ToString("yyyy-MM-dd")))
{
IniHandle.WriteSetting("时间记录", "RecordTime", DateTime.Now.ToString("yyyy-MM-dd"));
//进行操作
}
标签:recordTime,RecordTime,MM,更新,yyyy,日期,操作,Now,IniHandle From: https://www.cnblogs.com/zmy2020/p/17511547.html