Right now i am appending new line to existing file like this:
using (StreamWriter sw = File.AppendText(TemplateOutput))
{
sw.WriteLine(parsedFile);
}
This way AppendText adds automatically a line break to the end of the line. How could i change that so it wouldnt add the line break to the end?
Change the
WriteLinecall toWrite.Alternatively, if you’re just trying to append some text to a file, use
File.AppendAllText:No need to do any more work than that 🙂