DateTime ограничения
DateTime date = DateTime.Now.AddHours(26);
DateTime dateNow19 = new DateTime(date.Year, date.Month, date.Day, 19, 00, 00);
DateTime dateNow08 = new DateTime(date.Year, date.Month, date.Day, 08, 00, 00);
Console.WriteLine(date);
Console.WriteLine(dateNow19);
Console.WriteLine(dateNow08);
if (date < dateNow19 && date > dateNow08)
{
Console.WriteLine("Success19");
}
else
{
Console.WriteLine("False");
}
Info Important