示例#1
0
        public void EnrollInCourse(Course course)
        {
            if (this.EnrolledCourses.ContainsKey(course.GetName()))
            {
                throw new DuplicateEntryInStructureException(this.UserName, course.GetName());
            }

            this.enrolledCourses.Add(course.GetName(), course);
        }
示例#2
0
 public int CompareTo(Course other) => string.Compare(this.Name, other.GetName(), StringComparison.Ordinal);