예제 #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();
         return(idEquality && nameEquality && dateEquality);
     }
 }