public override bool IsContains(string text) { text = text.ToUpper(); if (AverageRating.ToString().Contains(text) || CourseNumber.ToString().Contains(text) || Commerce.ToString().Contains(text) || Name.ToUpper().Contains(text) || Age.ToString().Contains(text) || Sex.ToString().Contains(text)) { return(true); } else { return(false); } }
//A method to present a course object in a string public override string ToString() { return(CourseName.ToString() + " " + CourseNumber.ToString()); }
public override string ToString() { return(CourseNumber.ToString() + "," + CourseTitle + "," + Credits.ToString() + "," + LengthInWeeks.ToString()); }