Distinct by property of class by linq
- by phenevo
I have a collection:
List<Car> cars=new List<Car>
Cars are uniquely identified by CarCode.
I have three cars in the collection, and two with identical CarCodes.
How can I use LINQ to convert this collection to Cars with unique CarCodes?