-
Jan 11th, 2005, 07:08 PM
#1
Thread Starter
Fanatic Member
Help!! Reading files with FileStream - ReadLine() Overloads? String too big?
This is driving me freaking crazy. This part of the code hangs on a 644kb file....
fs = New FileStream(strSearchPath & "\" & folder.Name & "\" & file.Name, FileMode.Open, FileAccess.Read)
sr = New StreamReader(fs)
strBuffer = ""
sr.BaseStream.Seek(0, SeekOrigin.Begin)
While sr.Peek() > -1
strBuffer &= sr.ReadLine()
End While
The error is Public Overrides Overloads Function ReadLine() As String
and it seems that this part loops over and over again, resetting strBuffer
While sr.Peek() > -1
strBuffer &= sr.ReadLine()
End While
-
Jan 11th, 2005, 07:26 PM
#2
Thread Starter
Fanatic Member
Re: Help!! Reading files with FileStream - ReadLine() Overloads? String too big?
Never mind.. i changed that to sr.ReadToEnd
works better for what i want
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|