public override bool Equals(object obj) { if (obj == null) { return(false); } if (obj.GetType() != this.GetType()) { return(false); } Student student = (Student)obj; return(this.GetHashCode() == student.GetHashCode()); }