MartisK

Untitled

Oct 14th, 2020
642
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. foreach (var car in allCars)
  2.     {
  3.         int firstCheck = DateTime.Compare(currentDate, car.TechnicalInspectionDate);
  4.         int secondCheck = (car.TechnicalInspectionDate - currentDate).TotalDays;
  5.         if (DateTime.Compare(currentDate, car.TechnicalInspectionDate) >= 0 || (car.TechnicalInspectionDate - currentDate).TotalDays <= 30)
  6.         {
  7.             result.Add(car);
  8.         }
  9.     }
RAW Paste Data