User Tools

Site Tools


blog:2025-04-11-001



2025-04-11 Append line to the file without line break

  • 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?

Sloution

  • Change the WriteLine call to Write.

TAGS

  • 3 person(s) visited this page until now.

blog/2025-04-11-001.txt · Last modified: 2025/04/11 15:37 by jethro