Ejemplo n.º 1
0
        public override bool Equals(object obj)
        {
            Truck other = (Truck)obj;

            return(load == other.Load && towing == other.Towing && base.Equals(obj));
        }
Ejemplo n.º 2
0
 /// <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);
 }