Exemple #1
0
 //Overrides
 public override bool Equals(Object otherBeer)
 {
     if (!(otherBeer is Beer))
     {
         return(false);
     }
     else
     {
         Beer newBeer      = (Beer)otherBeer;
         bool idEquality   = (_id == newBeer.GetId());
         bool nameEquality = (_name == newBeer.GetName());
         bool abvEquality  = (_abv == newBeer.GetAbv());
         bool ibuEquality  = (_ibu == newBeer.GetIbu());
         return(idEquality && nameEquality && abvEquality && ibuEquality);
     }
 }