public List <Student> FetchStudents() { List <Student> Students = new List <Student>(); foreach (string StudentString in File.ReadAllLines("students.txt")) { string[] Arguments = StudentString.Split(':'); Students.Add(new Student(int.Parse(Arguments[0]), Arguments[1])); } return(Students); }
public List<string> GetStudentList() { return StudentString.Split(',').ToList(); }