Esempio n. 1
0
 public override bool Equals(System.Object otherCopy)
 {
     if (!(otherCopy is Copy))
     {
         return(false);
     }
     else
     {
         Copy newCopy            = (Copy)otherCopy;
         bool idEquality         = this.GetId() == newCopy.GetId();
         bool bookIdEquality     = this.GetBookId() == newCopy.GetBookId();
         bool copyNumberEquality = this.GetCopyNumber() == newCopy.GetCopyNumber();
         bool availableEquality  = this.GetAvailable() == newCopy.GetAvailable();
         return(idEquality && bookIdEquality && copyNumberEquality && availableEquality);
     }
 }