C
Curious
I have a file to which I'll need to at first read until it locates the
last line of string.
According to content of the last line of string, I'll need to write
something to this file right after the last line of string.
This requires that I'll need a StreamReader at first (to read one line
at a time), until the last line is read.
Then I'll need a StreamWriter to point to the end of the file, and
write to it.
Questions:
1) Is there a single Stream type of object that I can use for both
reading and writing, because I'll need to write at the point where
read operation is done?
2) Is there a method in the Stream object that reads only the last
line from a file (instead of reading all of the lines of strings)?
last line of string.
According to content of the last line of string, I'll need to write
something to this file right after the last line of string.
This requires that I'll need a StreamReader at first (to read one line
at a time), until the last line is read.
Then I'll need a StreamWriter to point to the end of the file, and
write to it.
Questions:
1) Is there a single Stream type of object that I can use for both
reading and writing, because I'll need to write at the point where
read operation is done?
2) Is there a method in the Stream object that reads only the last
line from a file (instead of reading all of the lines of strings)?