Check out example codes for "List string to file C#". It will help you in understanding the concepts better.

Code Example 1

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);

Learn ReactJs, React Native from akashmittal.com