title: Writing data to a buffer and reading data from a buffer
body: <p>I am currently looking into writing a program in c# which deals with managing log files. The purpose is the log file shouldn't exceed 50mb so I am renaming the file and creating a new and then it should start writing to the new file. To avoid data being written to the log while the files are changed I was thinking that in one part of the program I add the data to a buffer, then in another part of the program it reads the data in the buffer and outputs it to the file. If it can't write to the file it keeps it in the buffer until it can write to the file.</p>
  
  <p>How would I go about doing this I can't seem to find anything on Google not sure if I'm searching the correct thing. </p>
  
  <p>Thanks for any help you can provide</p>