Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- foreach (var car in allCars)
- {
- int firstCheck = DateTime.Compare(currentDate, car.TechnicalInspectionDate);
- int secondCheck = (car.TechnicalInspectionDate - currentDate).TotalDays;
- if (DateTime.Compare(currentDate, car.TechnicalInspectionDate) >= 0 || (car.TechnicalInspectionDate - currentDate).TotalDays <= 30)
- {
- result.Add(car);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement