Hi
When using StreamReader how can you reset the "pointer" to the beginning?
I'm reading some lines then, when a certain condition is met I want to read the whole file.
I've tried setting the BaseStream.Position = 0 but that acheives nothing.
This is my (extremely simplified) code....
fReadIn = New StreamReader(strFileName)
strLine = fReadIn.Readline
strLine = fReadIn.Readline
''.... various stuff and conditions happen here
fReadIn.BaseStream.Position = 0
strFileContents = fR.ReadToEnd
Any ideas?
Thanks
Sam
When using StreamReader how can you reset the "pointer" to the beginning?
I'm reading some lines then, when a certain condition is met I want to read the whole file.
I've tried setting the BaseStream.Position = 0 but that acheives nothing.
This is my (extremely simplified) code....
fReadIn = New StreamReader(strFileName)
strLine = fReadIn.Readline
strLine = fReadIn.Readline
''.... various stuff and conditions happen here
fReadIn.BaseStream.Position = 0
strFileContents = fR.ReadToEnd
Any ideas?
Thanks
Sam