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