Пример #1
0
 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);
     }
 }
Пример #2
0
 //A method to present a course object in a string
 public override string ToString()
 {
     return(CourseName.ToString() + " " + CourseNumber.ToString());
 }
Пример #3
0
 public override string ToString()
 {
     return(CourseNumber.ToString() + "," + CourseTitle + "," + Credits.ToString() + "," + LengthInWeeks.ToString());
 }