How to

append to a text file

Published: 3. November 2011 | Updated: 3. November 2011
License: Microsoft Public License (MS-PL)
Categories: File system » Files
Tags: C# File System Text
Was this snippet helpful for you? YESYES / NONO

Import namespace

using System.IO;

Code

string path = @"C:\Folder\file.txt";
string content = "text";

File.AppendAllText(path, content);
Send us feedback about this snippet »



Related Snippets: