static void Main() { string[] inputData = File.ReadAllLines(pathToFile); var studentsAndCourses = new StudentCollection(); foreach (var line in inputData) { Person currStudent = ExtractPersonFromString(line); studentsAndCourses.Add(currStudent, tempCourseHolder); } studentsAndCourses.Print(); }