public override bool Equals(Object obj) { //Check whether the compared object is null. if (obj == null) { return(false); } CSVEvent other = obj as CSVEvent; if ((Object)other == null) { return(false); } return(EventName.Equals(other.EventName) && YearLevel.Equals(other.YearLevel) && Cost.Equals(other.Cost) && Transport.Equals(other.Transport) && Location.Equals(other.Location) && StartDate.Equals(other.StartDate) && StartTime.Equals(other.StartTime) && FinishDate.Equals(other.FinishDate) && FinishTime.Equals(other.FinishTime) && DaysNotice.Equals(other.DaysNotice) && OtherDetails.Equals(other.OtherDetails)); }