Exemplo n.º 1
0
 public override bool Equals(Object otherBand)
 {
     if (!(otherBand is Band))
     {
         return(false);
     }
     else
     {
         Band newBand      = (Band)otherBand;
         bool idEquality   = (this.GetId() == newBand.GetId());
         bool nameEquality = (this.GetName() == newBand.GetName());
         return(idEquality && nameEquality);
     }
 }
Exemplo n.º 2
0
        public override bool Equals(Object otherBand)
        {
            if (!(otherBand is Band))
            {
                return(false);
            }
            else
            {
                Band newBand         = (Band)otherBand;
                bool idEquality      = _id == newBand.GetId();
                bool nameEquality    = _name == newBand.GetName();
                bool contactEquality = _contact == newBand.GetContact();

                return(idEquality && nameEquality && contactEquality);
            }
        }