Check out example codes for "asp.net c# write string to text file". It will help you in understanding the concepts better.

Code Example 1

using (StreamWriter writer = new StreamWriter("email.txt", true)) //// true to append data to the file
{
    writer.WriteLine("your_data"); 
}

Learn ReactJs, React Native from akashmittal.com