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);
        }
示例#2
0
 public List<string> GetStudentList()
 {
     return StudentString.Split(',').ToList();
 }