Answers for "streamwriter append text"

4

c# append to file

File.AppendAllText(@"c:\path\file.txt", "text content" + Environment.NewLine);
Posted by: Guest on February-07-2020
1

c# append to file

using(StreamWriter writer = new StreamWriter("C:\\log.txt", true)) 
{ 
	writer.WriteLine("Line"); 
}
Posted by: Guest on March-30-2020
1

streamwriter append text

using (FileStream fs = new FileStream(fileName,FileMode.Append, FileAccess.Write))
 using (StreamWriter sw = new StreamWriter(fs))
 {
    sw.WriteLine(something);
 }
Posted by: Guest on June-22-2020

Browse Popular Code Answers by Language