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