c# append to file

C#
using(StreamWriter writer = new StreamWriter("C:\\log.txt", true)) 
{ 
	writer.WriteLine("Line"); 
}File.AppendAllText(@"c:\path\file.txt", "text content" + Environment.NewLine);
Source

Also in C#: