Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Private Sub makeArray()
- Dim studentfs As New FileStream(fileName, FileMode.Open, FileAccess.Read)
- Dim studentFile As New StreamReader(studentfs)
- Dim name As String = studentFile.ReadLine
- Dim counter As Integer
- If fileName <> Nothing Then
- Me.lblName.Text = "Student Name: " & name
- Do While studentFile.Peek > -1
- counter += 1
- ReDim Preserve testMarks(counter - 1)
- testMarks(counter - 1).testName = studentFile.ReadLine
- testMarks(counter - 1).testMark = studentFile.ReadLine
- Loop
- End If
- studentFile.Close()
- studentfs.Close()
- End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement