Example #1
0
 public void EnrollInCourse(Course course)
 {
     if (this.enrolledCourses.ContainsKey(course.Name))
     {
        throw new DuplicateWaitObjectException(this.UserName,course.Name);
     }
     this.enrolledCourses.Add(course.Name, course);
 }
Example #2
0
        public void EnrollInCourse(Course course)
        {
            if (this.EnrolledCourses.ContainsKey(course.Name))
            {
              throw new DuplicateEntryInStructureException(this.userName, course.Name);

            }

            this.enrolledCourses.Add(course.Name, course);
        }