Example #1
0
 public override bool Equals(System.Object otherCourse)
 {
     if (!(otherCourse is Course))
     {
         return(false);
     }
     else
     {
         Course newCourse  = (Course)otherCourse;
         bool   idEquality = (this.GetId() == newCourse.GetId());
         bool   nameEq     = (this.GetCourseName() == newCourse.GetCourseName());
         bool   numberEq   = (this.GetCourseNumber() == newCourse.GetCourseNumber());
         return(idEquality && nameEq && numberEq);
     }
 }