For Each line As String In System.IO.File.ReadAllLines('file.txt') 'Do Something' Next
and
Using f As System.IO.FileStream = System.IO.File.OpenRead('somefile.txt') Using s As System.IO.StreamReader = New System.IO.StreamReader(f) While Not s.EndOfStream Dim line As String = s.ReadLine 'put you line processing code here End While End Using End Using
are both showing as mostly red, I’m running a clean install of MS VS2005 and these codes were both recomended to me, am I missing something else I need to install or declare?
for vb6.0 you need