예제 #1
0
파일: Truck.cs 프로젝트: gwalton2/CS155
        public override bool Equals(object obj)
        {
            Truck other = (Truck)obj;

            return(load == other.Load && towing == other.Towing && base.Equals(obj));
        }
예제 #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);
 }