I have no clue why this piece of code doesn't work, It give a Null Reference exception even though the file has a bunch of lines in it. It only goes through once and fails when it actually tries to read the file
Code:Function FileReader() As ArrayList Dim oDataStore As System.IO.File Dim srReader As System.IO.StreamReader srReader = oDataStore.OpenText("c:\DataStore.txt") While srReader.Peek <> -1 FileReader.Add(srReader.ReadLine) End While srReader.Close() End Function




Reply With Quote