Forums
New posts
Search forums
What's new
New posts
New profile posts
Latest activity
Members
Current visitors
New profile posts
Search profile posts
C# Community
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
VB.NET
VB.NET General Discussion
StreamReader - reset to the top
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="samshiell, post: 7572, member: 1066"] 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 [size=2]BaseStream.Position = 0 but that acheives nothing.[/size] [size=2]This is my (extremely simplified) code....[/size] [size=2][size=2]fReadIn = [/size][size=2][color=#0000ff]New[/color][/size][size=2] StreamReader(strFileName)[/size] strLine = fReadIn.Readline strLine = fReadIn.Readline ''.... various stuff and conditions happen here [size=2]fReadIn.BaseStream.Position = 0[/size] [size=2]strFileContents = fR.ReadToEnd[/size] [size=2] [/size][size=2]Any ideas?[/size] [size=2]Thanks[/size] [size=2]Sam [/size][/size] [/QUOTE]
Insert quotes…
Verification
Post reply
VB.NET
VB.NET General Discussion
StreamReader - reset to the top
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.
Accept
Learn more…
Top
Bottom