Beispiel #1
0
 public override bool Equals(System.Object otherStudent)
 {
     if (!(otherStudent is Student))
     {
         return(false);
     }
     else
     {
         Student newStudent     = (Student)otherStudent;
         bool    idEquality     = (this.GetId() == newStudent.GetId());
         bool    nameEquality   = (this.GetName() == newStudent.GetName());
         bool    dateEquality   = (this.GetDate() == newStudent.GetDate());
         bool    deptIdEquality = (this.GetDeptId() == newStudent.GetDeptId());
         return(idEquality && nameEquality && dateEquality && deptIdEquality);
     }
 }