I have two collections
List<Car> currentCars = GetCurrentCars();
List<Car> newCars = GetNewCars();
I don't want to use foreach loop or something because i think there should be much better way of doing this.
I am looking for more efficient way to compare this collections and to get results:
- List of cars which are in newCars and not in currentCars
- List of cars which are not in newCars and in currentCars
Type Car has int property Id.
There was an answer, which is already deleted saying What i mean by saying efficient: less code, less mechanics, and more readable cases
So thinking this way what is the cases i have?
What would be less code, less mechanics, and more readable cases?