J
JerryWEC
Hi all!
I'm creating a file using the following lines of code inside a property
set...
If Not File.Exists(value) Then
StreamWriter = File.CreateText(value)
StreamWriter.Close()
End If
When I look at this file it has a blank line (maybe a newline character).
I've been running like this for several months no problems. It just bugged
me that I had this extra line at the end of my log files.
Writing lines using...
StreamWriter.WriteLine("Some Text")
Now I'm trying to create an automatic clean up method to keep only the last
max lines. (In this case i'm using 1000 lines.) However, when I get to 1001
lines written. I use...
Dim oldLines() as String = File.ReadAllLines(MyFileName)
And it's getting the extra blank line. Is this normal to have an extra line
at the end of your files using the above code???
TIA! Jerry
I'm creating a file using the following lines of code inside a property
set...
If Not File.Exists(value) Then
StreamWriter = File.CreateText(value)
StreamWriter.Close()
End If
When I look at this file it has a blank line (maybe a newline character).
I've been running like this for several months no problems. It just bugged
me that I had this extra line at the end of my log files.
Writing lines using...
StreamWriter.WriteLine("Some Text")
Now I'm trying to create an automatic clean up method to keep only the last
max lines. (In this case i'm using 1000 lines.) However, when I get to 1001
lines written. I use...
Dim oldLines() as String = File.ReadAllLines(MyFileName)
And it's getting the extra blank line. Is this normal to have an extra line
at the end of your files using the above code???
TIA! Jerry