Esempio n. 1
0
 public override bool Equals(System.Object otherBand)
 {
     if (!(otherBand is Band))
     {
         return(false);
     }
     else
     {
         Band newBand          = (Band)otherBand;
         bool idEquality       = (this.GetId() == newBand.GetId());
         bool bandNameEquality = (this.GetBandName() == newBand.GetBandName());
         return(idEquality && bandNameEquality);
     }
 }
Esempio n. 2
0
 public override bool Equals(System.Object otherBand)
 {
     if (!(otherBand is Band))
     {
         return(false);
     }
     else
     {
         Band newBand       = (Band)otherBand;
         bool nameEquality  = (this.GetBandName() == newBand.GetBandName());
         bool genreEquality = (this.GetBandGenre() == newBand.GetBandGenre());
         bool fromEquality  = (this.GetBandFrom() == newBand.GetBandFrom());
         return(nameEquality && genreEquality && fromEquality);
     }
 }