Link to home
Start Free TrialLog in
Avatar of SGyves
SGyves

asked on

StreamWriter Opening and Closing

I know how to create a StreamWriter like so:

Dim srFileWriter As New System.IO.StreamWriter("RecResults.txt", True)

close it like this

srFileWriter.Close()


but say I want to reopen that file for more writing after I close it. How do I do that with the same object? You see two functions trade off writing to this file...so I have to close one stream to allow the other to do some writing..then reopen it when the function returns.
ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of SGyves
SGyves

ASKER

I will probably just go for simplicity for now and learn about the IDispose black magic later.