Advertisement
Guest User

Untitled

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