G
Guest
I have a need to replace text in a file with new text. The files may or may
not be text files in the sense that there may not be "lines" and they may not
contain printable characters.
I tried the StreamReader and StreamWriter approach and the String.Replace
method. It works well, except that not all the file contents gets preserved.
Three bytes at the start of the file are omitted. These occur just before the
CRLF characters. Can I read the file in a binary way and then use the
equivalent to the String.Replace? The input will no longer be a string
not be text files in the sense that there may not be "lines" and they may not
contain printable characters.
I tried the StreamReader and StreamWriter approach and the String.Replace
method. It works well, except that not all the file contents gets preserved.
Three bytes at the start of the file are omitted. These occur just before the
CRLF characters. Can I read the file in a binary way and then use the
equivalent to the String.Replace? The input will no longer be a string