//override public override bool Equals(System.Object otherRestaurant) { if (!(otherRestaurant is Restaurant)) { return(false); } else { Restaurant newRestaurant = (Restaurant)otherRestaurant; bool idEquality = (this).GetId() == newRestaurant.GetId(); bool specialtyEquality = (this).GetSpecialty() == newRestaurant.GetSpecialty(); return(idEquality && specialtyEquality); } }