In the code block below I would expect dictCars to contain: { Chevy:Camaro, Dodge:Charger }
But, dictCars comes back empty. Because this line returns false each time it
You need to implement Equals. Most probably as:
public override bool Equals(object obj) { Car car = obj as Car; if(car == null) return false; return car.CarID == this.CarID && car.CarName == this.CarName; }