title: (C# WinFoms) Writing files and New line
body: <p>I'm making changes to a file, the 'source' file is a plain text file, but from a UNIX system.</p>
  
  <p>I'm using a <code>StreamReader</code> to read the 'source' file, I then make and store the changes to a <code>StringBuilder</code> using <code>AppendLine()</code>.</p>
  
  <p>I then create a <code>StreamWriter</code> (set-up with the same <code>Encoding</code> as the <code>StreamReader</code>) and write the file.</p>
  
  <p>Now when I compare the two files using WinMerge it reports that the carriage return characters are different.</p>
  
  <p><strong>What should I do to ensure that the carriage return characters are the same for the type of file that I am editing?</strong> </p>
  
  <p>It should also be noted that the files that are to be modified <strong>could come from any system</strong>, not just from a UNIX system, they could equally be from a Windows system - so I want a way of inserting these new lines with the same type of carriage return as the original file</p>
  
  <p>Thanks very much for any and all replies.</p>
  
  <p>:)</p>