Modify FileStream
问题 I'm working now on a class that will allow editing very big text files (4Gb+). Well it may sound a little stupid but I do not understand how I can modify text in a stream. Here is my code: public long Replace(String text1, String text2) { long replaceCount = 0; currentFileStream = File.Open(CurrentFileName, FileMode.Open, FileAccess.ReadWrite, FileShare.None); using (BufferedStream bs = new BufferedStream(currentFileStream)) using (StreamReader sr = new StreamReader(bs)) { string line; while