Answers for "List string to file C#"

C#
0

List string to file C#

string[] lines = { "First line", "Second line", "Third line" };
System.IO.File.WriteAllLines(@"C:\Users\Public\TestFolder\WriteLines.txt", lines);
lines = { "Fourth line", "Fith line" };
System.IO.File.AppendAllLines(@"C:\Users\Public\TestFolder\WriteLines.txt", lines);
Posted by: Guest on August-14-2020

C# Answers by Framework

Browse Popular Code Answers by Language