📅  最后修改于: 2022-03-11 14:48:53.752000             🧑  作者: Mango
TimeSpan time = DateTime.Now.TimeOfDay;
if (time > new TimeSpan(00, 00, 01) //Hours, Minutes, Seconds
&& time < new TimeSpan(08, 00, 00)) {
//match found
}