So I'm still a bit of a newbie when it comes to programming, hence why I'm using visual basic. I'm getting this exception raised repeatedly, but the variables that vb is saying have unassigned values have been given values in my code. Can anyone point out where I'm going wrong with this?
EDIT: just a few more details: the file exists, I can read from it using just the ReadLine method, but I need to split the fields so I can compare the scores and get the highest 2 scores
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
    Dim srdFile As System.IO.StreamReader
    Dim strLine As String
    Dim strField(1) As String
    Dim strName() As String
    Dim strScore() As String
    Dim i = 0
    srdFile = New System.IO.StreamReader("HighScores.dat")
    rtbOut.AppendText("HighScores:" & vbNewLine & vbNewLine)
    Do Until srdFile.Peek() = -1
            strLine = srdFile.ReadLine()
            strField = strLine.Split(",")
            strName(i) = strField(0)
            strScore(i) = strField(1)
            rtbOut.AppendText(strName(i) & ", " & strScore(i) & vbNewLine)
            i = i + 1
    Loop
End Sub
 
     
     
    