Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static Student[] ReadFile()
- {
- string[] lines = File.ReadAllLines(Filepath);
- string[] lineSegments = new string[13];
- Student[] readStudents = new Stundent[lines.Length - 1];
- for (int i = 1; i < lines.Length; i++)
- {
- lineSegments = lines[i].Split(';');
- readStudents[i - 1] = new Student(lineSegments[0], lineSegments[1], lineSegments[2], lineSegments[3], lineSegments[4],
- lineSegments[5], lineSegments[7], lineSegments[8], lineSegments[9], lineSegments[10],
- lineSegments[11], lineSegments[12]);
- }
- return readStudents;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement