0

As some of you know I am moving to VB.net from VB5. I see that to read and write to text files there are two options

1) Use System.IO.File e.g Filewritealltext ( options...)

or

2) Use Streamwriter e.g Dim ts as StreamWriter( options...)

Are there any differences, apart from syntax, that I should be aware of, e.g speed, memory use, etc. Both appear to do same thing if reading and ariting to text files.

2
Contributors
1
Reply
6
Views
1 Year
Discussion Span
Last Post by Reverend Jim
0

My preference is that if I am reading/writing enormous files I use StreamReader/Writer but if I am working with smaller files (anything under 1000 lines or so) I read/write the entire file all at once and skip the Streaming.

Edited by Reverend Jim

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.