I am trying to read from a file and save rows to a string or array Im not sure which would be more efficient.
string[] array = new string roomNumber[30];
string[] testScore;
I have the test file set up the following with random values;
studentID, classroomNumber (1-30), testScore (1-100);
SID001, 1, 90
SID002, 1, 88
SID003, 1, 99
SID004, 2, 78
SID005, 2, 100
SID006, 2, 98
ETC, to room number 30
I am trying to store the second row to string[] roomNumber; and third row to string[] testScore. Then get the total score for each classroomNumber 1, 2, 3, etc as well as the average for each classroomNumber. I have tried many different ways but not sure how to store seperate rows to a string then call it and use it when needed. Thank you for the help.