Пример #1
0
 public override bool Equals(System.Object otherStudent)
 {
     if (!(otherStudent is Student))
     {
         return(false);
     }
     else
     {
         Student newStudent        = (Student)otherStudent;
         bool    firstNameEquality = (this.GetFirstName() == newStudent.GetFirstName());
         bool    lastNameEquality  = (this.GetLastName() == newStudent.GetLastName());
         bool    rawDateEquality   = (this.GetDate() == newStudent.GetDate());
         bool    idEquality        = (this.GetId() == newStudent.GetId());
         return(firstNameEquality && lastNameEquality && rawDateEquality && idEquality);
     }
 }