public override bool Equals(object obj) { Truck other = (Truck)obj; return(load == other.Load && towing == other.Towing && base.Equals(obj)); }
/// <summary> /// Compares two truck objects /// </summary> /// <param name="obj">Other truck object</param> /// <returns>true if equal</returns> public bool Equals(Truck obj) { return(Manufacturer == obj.Manufacturer && Cylinders == obj.Cylinders && Owner == obj.Owner && LoadCapacity == obj.LoadCapacity && TowingCapacity == obj.TowingCapacity); }