Unity中确定时间是否在一定范围内
作者:互联网
DateTime DateReg = Convert.ToDateTime(RegTime); DateTime MaxDate = Convert.ToDateTime(MaxTime); DateTime MinDate = Convert.ToDateTime(MinTime); if (!((NowTime.CompareTo(MinDate) >= 0 && NowTime.CompareTo(MaxDate) <= 0) && (DateReg.CompareTo(MinDate) >= 0 && DateReg.CompareTo(MaxDate) <= 0))) { Application.Quit(); }
标签:Convert,&&,是否,确定,DateTime,Unity,MaxDate,ToDateTime,CompareTo 来源: https://www.cnblogs.com/clhxxlcj/p/10954824.html