Exemple #1
0
 public override bool Equals(System.Object otherPatron)
 {
     if (!(otherPatron is Patron))
     {
         return(false);
     }
     else
     {
         Patron newPatron    = (Patron)otherPatron;
         bool   idEquality   = this.GetId() == newPatron.GetId();
         bool   nameEquality = this.GetName() == newPatron.GetName();
         bool   numEquality  = this.GetPhone() == newPatron.GetPhone();
         return(idEquality && nameEquality && numEquality);
     }
 }