Пример #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.GetDescription() == newStudent.GetDescription();
         return(idEquality && nameEquality);
     }
 }