I got this error from this code:
ERROR:
An unhandled exception of type 'System.NullReferenceException' occurred in Lap Time Analyser.exe
Additional information: Object reference not set to an instance of an object.
CODE:
VB Code:
Private Sub btnplusminus_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnplusminus.Click Dim laptime() As String Dim i, num As Integer Dim sr As IO.StreamReader = IO.File.OpenText(path) Do While (sr.Peek <> -1) sr.ReadLine() num += 1 Loop sr.Close() Dim srr As IO.StreamReader = IO.File.OpenText(path) For i = 1 To num laptime(i) = srr.ReadLine Next srr.Close() End Sub
Im thinking its the laptime(i) that is screwing up because that is where it stops in the debugging tool. Help PLZ
My file looks like :
Alain
Ste-Julie
03
02
21
4/18/2006 5:25:14 PM





Reply With Quote