Exemple #1
0
 public override bool Equals(System.Object otherAuthor)
 {
     if (!(otherAuthor is Author))
     {
         return(false);
     }
     else
     {
         Author newAuthor  = (Author)otherAuthor;
         bool   idEquality = (this.GetId() == newAuthor.GetId());
         bool   firstEq    = (this.GetFirst() == newAuthor.GetFirst());
         bool   lastEq     = (this.GetLast() == newAuthor.GetLast());
         return(idEquality && firstEq && lastEq);
     }
 }