Esempio n. 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);
        }
Esempio n. 2
0
 public int CompareTo(Course other) => string.Compare(this.Name, other.GetName(), StringComparison.Ordinal);