JumpyNET Posted April 19, 2005 Posted April 19, 2005 I use SreamWriter and WriteLine to write to a text-file. But StreamWriter adds an extra carriage return to the end of the file. I tried Write instead of WriteLine but it didn't help. :confused: How can I get rid of the extra carriage return in the end of the file? :cool: I'm using VB.NET 2003 Quote
JumpyNET Posted April 19, 2005 Author Posted April 19, 2005 I think I have located the problem. :D It seems like it depends on the file I'm writing to. For example if I have an existing file with an extra carriage return in the end, like this: "Aaaaa Bbbbb Ccccc " ...then I try to write over it a text like this(no carriage return in the end): "Aaaaa Bbbbb Ccccc" ...and like magic it doesn't replace the old text file. :eek: Seems really odd to me!! Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.