private bool CheckForStudent(Student student, Course course) { bool isStudentInCourse = false; Dictionary<uint, Student> students = course.ViewStudents(); if (students.ContainsKey(student.Id)) { isStudentInCourse = students[student.Id].Name == student.Name; } return isStudentInCourse; }
private static bool CompareStudents(Course course, Course cloneCourse) { bool isEqual = true; foreach (var student in course.ViewStudents()) { if (!cloneCourse.ViewStudents().ContainsKey(student.Key)) { isEqual = false; break; } } return isEqual; }