Dim filepath As String = "C:\Code\Practice\TestBed9\bin\grades.txt"
'create arrays (or in this case arraylists)
Dim labs As New ArrayList
Dim questions As New ArrayList
Dim tests As New ArrayList
Dim participations As New ArrayList
'open file
Dim fs As New IO.FileStream(filepath, FileMode.Open)
'create reader for file
Dim sr As New IO.StreamReader(fs)
'read until there is no more to read
Do While sr.Peek > -1
'read one line at a time
Dim line As String = sr.ReadLine
'parse into fields
Dim fields() As String = line.Split(Char.Parse(","))
'test for student match
If fields(0) = cboStudent.Text Then 'name
Select Case fields(1) 'type
Case "Lab"
labs.Add(fields(2)) 'grade
Case "Questions"
questions.Add(fields(2)) 'grade
Case "Tests"
tests.Add(fields(2)) 'grade
Case "Participation"
participations.Add(fields(2)) 'grade
End Select
End If
Loop
'close and release file
fs.Close()